I was wondering if anyone knows how to create a Char to Hex converter, and a Hex to Char converter...
Thanks.
I was wondering if anyone knows how to create a Char to Hex converter, and a Hex to Char converter...
Thanks.
Depends on what you mean by "Char to Hex" conversion.
If you're talking about taking an ASCII character and obtaining the hexadecimal number equivalent, then it should be as simple as creating an array that maps the values.
Also, look-up atoi() (ASCII to Integer)Code:cin >> hex >> x; //Get a number in hex format cout << "\t" << (char)x << "\t\t ASCII" << endl; //Display an ASCII character