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
I have tried using
cout<<this<<": ("<<this->previous<<", "<<this->next<<", "<<this->element<<")"<<endl;
cout<<ios::hex<< //values 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.
cout<<//line to print