How do u set the precision for float variables using Visual C++ 6.0,
I tried this:
#include <iostream>
#include <iomanip>
.
.
using namepsace std;
.
.
float something = 1.111;
cout << fixed << showpoint;
cout << setprecision(2) << something;
this didn't work so i tried this:
cout(setf(ios::fixed,ios::floatfield);
cout.setf(ios::showpoint);
which didn't work either.
Any suggestions how to get it to work?