#include <iomanip> //required for setprecision
#include <iostream.h> // required for fixed or scientific manipulators
void main ()
{
cout<<setprecision(2)<<fixed; //compiler error - 'fixed' udeclared???
__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
> cout<<setprecision(2)<<fixed; //compiler error - 'fixed' udeclared???
Use:
cout.setf(ios::fixed);
cout.precision(2);
{rb}
--
This time, like all time, is a very good one if we but know what to do with
it. - Ralph Waldo Emerson
>cout << setprecision(2) << setiosflags(ios::fixed) ;
I read something recently that said this would be the more correct:
cout << setprecision(2) << setiosflags(ios::fixed | ios::showpoint);
The reference mentioned that showpoint should always be set when using
setiosflag.
Can anyone shed more light on this?
{rb}
--
Believe those who are seeking truth, doubt those who find it. - Andre' Gide