I have something like
unsigned x = 16; unsigned* p = &x; std::cout << std::hex << std::setw(16) << std::setfill('0') << x << std::endl; std::cout << std::hex << std::setw(16) << std::setfill('0') << p << std::endl;
exit:
0000000000000010 000x7fffc35ba784
ostream :: operator <<is overloaded for this? I can write this correctly with C, but I was wondering if there is a way to do this with iostream.
source share