To get the char code in C++ you can use the following snippet.
Simply cast the Char to int.
Sample C++
cout << (int)'A' << endl;
To get the char code in C++ you can use the following snippet.
Simply cast the Char to int.
cout << (int)'A' << endl;
To get the char code in C you can use the following snippet.
char testChar = 'a'; printf("%d",testChar);