L
Luther Baker
Hi,
This doesn't do what I expect.
int t = 27;
std::cout << "myHex: '" << std::ios::hex << t << "'" << std::endl;
std::cout.setf(std::ios::hex);
std::cout << "moreHex: '" << t << "'" << std::endl;
VC++ 7.1 says:
myHex: '204827'
moreHex: '27'
while gcc 3.3 says:
myHex: '827'
moreHex: '27'
Instead of converting the stream to hex, it appears I am just printing a
platform specific constant in front of my variable.
Simple words of wisdom to print hex?
Thanks,
-Luther
This doesn't do what I expect.
int t = 27;
std::cout << "myHex: '" << std::ios::hex << t << "'" << std::endl;
std::cout.setf(std::ios::hex);
std::cout << "moreHex: '" << t << "'" << std::endl;
VC++ 7.1 says:
myHex: '204827'
moreHex: '27'
while gcc 3.3 says:
myHex: '827'
moreHex: '27'
Instead of converting the stream to hex, it appears I am just printing a
platform specific constant in front of my variable.
Simple words of wisdom to print hex?
Thanks,
-Luther