C++ examples for File Stream:cout
Manipulator | Description |
---|---|
skipws | Skip white-space characters on an input stream. This setting is reset with stream manipulator noskipws. |
left | Left justify output in a field. Padding characters appear to the right if necessary. |
right | Right justify output in a field. Padding characters appear to the left if necessary. |
internal | Indicate that a number's sign should be left justified in a field and a number's magnitude should be right justified in that same field. |
boolalpha | Specify that bool values should be displayed as the word true or false. |
dec | Specify that integers should be treated as decimal (base 10) values. |
oct | Specify that integers should be treated as octal (base 8) values. |
hex | Specify that integers should be treated as hexadecimal (base 16) values. |
showbase | Specify that the base of a number is to be output ahead of the number (a leading 0 for octals; a leading 0x or 0X for hexadecimals). This setting is reset with stream manipulator noshowbase. |
showpoint | Specify that floating-point numbers should be output with a decimal point. |
uppercase | Specify that uppercase letters (i.e., X and A through F) should be used in a hexadecimal integer and that uppercase E should be used when representing a floating-point value in scientific notation. This setting is reset with stream manipulator nouppercase. |
showpos | Specify that positive numbers should be preceded by a plus sign (+). This setting is reset with stream manipulator noshowpos. |
scientific | Specify output of a floating-point value in scientific notation. |
fixed | Specify output of a floating-point value in fixed-point notation with a specific number of digits to the right of the decimal point. |