Home

I am reading TC++PL3, and on page 468, at "21.4.3 Floating-Point
Output", it formats floating point output in the style:


cout.setf(ios_base::scientific, ios_base::floatfield); // use scientific
// format

cout<< "scientific:\t"<< 1234.56789<< '\n';


However my compiler compiles "cout.setf(ios_base::scientific)" OK.

Does this statement affect more stream states than the original
statement using "ios_base::floatfield", or is "ios_base::floatfield"
usage, a redundant explicit statement?

previous
next

Re: comma overload semantics
Re: Writing Scalabe Software in C++
Re: Newbie completely confused
Re: About const reference bounding to temporary variables.
The Truth
Nasze Dzieci
Dzieci Niczyje
Podaruj Zycie
Mam Marzenie
Fundacja Hobbit