Really, what's the opposite of “fixed” I/O manipulator?
问题 This may be a duplicate of this question, but I don't feel it was actually answered correctly. Observe: #include <iostream> #include <iomanip> using namespace std; int main () { float p = 1.00; cout << showpoint << setprecision(3) << p << endl; } Output: 1.00 Now if we change that line to: cout << fixed << showpoint << setprecision(3) << p << endl; we get: 1.000 And if we use the "opposite" of fixed we get something totally different: cout << scientific << showpoint << setprecision(3) << p <<