n | Anzahl der Zeichen für die nächste formatierte Ein-/Ausgabe |
Rückgabewert: ein implementationsabhängiger Manipulator,
der bei str«manip
bzw. str»manip
die Anweisung str.width(n);
ausführt.
#include <iostream> #include <iomanip> int main() { int i = 25; std::cout << std::setw(10) << i << '\n'; }