Whenever I print out the value of pointers, they normally print normally (as in an address in hexadecimal). But if I print a null pointer, it only prints 0 and not 0x00etc. The print line is
Code:
cout<<this<<": ("<<this->previous<<", "<<this->next<<", "<<this->element<<")"<<endl;
I have tried using
Code:
cout<<ios::hex<< //values to print
and also
Code:
cout.setf(ios::hex)
cout<<//line to print
But each time it still only prints a single 0 when the pointer is null. Is this a Linux issue by any chance? Or a code issue? Thanks.