From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maurizio Loreti To: help-gcc@gnu.org Subject: Re: c++: setting output format to hex?? Date: Fri, 31 Dec 1999 22:24:00 -0000 Message-ID: References: <38482D56.A07629CE@advalvas.be> X-SW-Source: 1999-12n/msg00061.html Message-ID: <19991231222400.6GDdtv7CBjmgDw6nZHj5vGVJwjWiVBlSknvpu4Z7UK0@z> Guy Van Den Bergh writes: > Hi there, > I want to know how I can set the output format (for cout output stream) > for integers to hex or oct. #include using namespace std; int main() { cout << hex << 42 << endl; } > Thanx! You are strongly encouraged to buy some FM and to RTFM. -- Maurizio Loreti http://www.pd.infn.it/~loreti/mlo.html Univ. of Padova, Dept. of Physics - Padova, Italy loreti@pd.infn.it