1.

How do I write my own zero-argument manipulator that should work same as hex?

Answer»

#include &LT;iostream> ostream& myhex ( ostream &o ) { o.setf ( ios::hex) ; return o ; } INT MAIN( ) { cout << endl << myhex << 2000 ; return 0; }

Output:

 2000


Discussion

No Comment Found