(unspecified) resetiosflags(ios_base::fmtflags qResetFlags);
#include <iomanip>
#include <iostream>
#include <iomanip>
int main() {
using namespace std;
double dNumber = 9287.343535;
// Output the value with default settings
cout << "Default: " << dNumber << endl;
// Output the value with in scientific notation
cout << setiosflags(ios_base::scientific);
cout << "Scientific notation: " << dNumber << endl;
// Reset the scientific notation flag
cout << resetiosflags(ios_base::scientific);
cout << "Reset: " << dNumber << endl;
// Keep the window open
cin.get();
return 0;
}
© 20072025 XoaX.net LLC. All rights reserved.