The following program demonstrates this:
#include <iostream> using namespace std; int main() { unsigned char c = 0xabcd; cout << "c: " << hex << static_cast<int>(c) << endl; return 0; }
#include <iostream> using namespace std; int main() { unsigned char c = 0xabcd; cout << "c: " << hex << static_cast<int>(c) << endl; return 0; }
No comments:
Post a Comment