|
From: Graham D. <g.d...@nt...> - 2003-07-30 18:47:24
|
char* is more difficult, since there's a specific overload for it that prints a string. I suppose you could cast it to a long and print that. Bit ugly, though. char * str; cout << hex << reinterpret_cast<long>(str) << endl; By the way, my earlier answer could be even simpler: int var; cout << &var << endl; // still prints in hex. Graham Esteban Valverde wrote: >What a dummy !!! thanks... and what about char * ? > >char * str; >... >cout << hex << str > >doesn't works. > > >Esteban > > >----- Original Message ----- >From: "Graham Douglas" <g.d...@nt...> >To: "Esteban Valverde" <est...@ho...> >Sent: Tuesday, 29 July, 2003 16:24 >Subject: Re: [Dev-C++] Manipulator > > >cout << hex << &var << endl; > > > > > |