Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

c++ char to ascii


ghost's Avatar
0 0

i need to change a char to a ascii value dec i am writing an encryption program is there ne way to do this …


ghost's Avatar
0 0
#include <iostream>

int main(int argc, char **argv)
{
char myChar = 'A';
std::cout << static_cast<int>(myChar) << std::endl;
return 0;
}

<3 ~T