(unspecified) setw(int iWidth);
#include <iomanip>
#include <iostream> #include <iomanip> int main() { using namespace std; double dPi = 3.14159; // Output the value with default settings cout << "Default : " << dPi << endl; // Output the value using 10 width cout << "Width 10: " << setw(10) << dPi << endl; // Keep the window open cin.get(); return 0; }
© 20072024 XoaX.net LLC. All rights reserved.