Ausgabe über cout

#1118712
Lesenswert?

cout.setf(ios::XXXX)

wobei XXX folgendes sein kann:
1
left            left-justifies the output
2
right           right-justifies the output
3
showpoint       displays decimal point and trailing zeros for all floating point numbers, even if the decimal places are not needed.
4
uppercase       displays the "e" in E-notation as "E" rather than "e"
5
showpos         displays a leading plus sign before positive values
6
scientific      displays floating point numbers in scientific ("E") notation
7
fixed           displays floating point numbers in normal notation -no trailing zeroes and no scientific notation

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren