nada escribi=F3:
>
> 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;
You must use setiosflags( ) if you want to use stream manipulators. For=20
using two or more manipulators you must bit OR the flags:
cout << setiosflags(ios::fixed |ios::showpoint) << setprecision(2) <<=20
number << endl;
By the way, the "fixed undeclarer" error means that gcc treats "fixed"=20
as a variable which wasn=B4t declared
--=20
Saludos
Ricardo Amores Hern=E1ndez
ricky QuitaEsto @ telecable.es
|