#include <iostream>
int main()
{
char myChar = 89;
std::cout << "The ASCII char of " << static_cast<int>(myChar) << " is " << myChar;
//you can use (int)myChar; which is the C way of casting and is also accepted in C++, but the one used here is the standard
//or this:
std::cout << "\n";
char myChar2 = 'Y';
std::cout << "The ASCII char of " << static_cast<int>(myChar2) << " is " << myChar2;
std::cin.ignore();
std::cin.get();
return 0;
}