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