[Dev-C++] [?] Difference between output formatting styles
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: nada <na...@ca...> - 2003-03-08 13:20:37
|
Why does Dev-C++ compile the following just fine:
cout.setf(ios::fixed,ios::floatfield);
cout.setf(ios::showpoint);
cout<<setprecision(2)<<number<<endl;
yet yields a "fixed undeclared" error on:
cout<<fixed<<showpoint<<setprecision(2)<<number<<endl;
Both include <iomanip>.
It seems that most textbooks use the last style. Deitel & Deitel is the
only text I have here that uses the first style. I am using a newer text
by Malik which claims to be ANSI/ISO compliant. It uses the first
style. And says the last style is Standard C++.
What's up?
TIA.
{rb}
--
The quickest way to double your money is to fold it in half and put it back
in your pocket.
|