#include <iostream>
#include <sstream>
int main() {
char asciiChar = 'A';
std::stringstream ss;
ss << std::hex << static_cast<int>(asciiChar);
std::string hexValue = ss.str();
std::cout << "The hexadecimal value of '" << asciiChar << "' is: 0x" << hexValue << "\n";
}
/*
run:
The hexadecimal value of 'A' is: 0x41
*/