C++: ..Manipulators continued
..Manipulators continued
| Manipulator |
Purpose |
|---|---|
| noshowpos | Do not show plus sign for positive values |
| uppercase | Display uppercase A-F for hex values, and E for scientific values |
| nouppercase | Do not display hex values in uppercase |
| showpoint | Show decimal point and trailing zeros for float values |
| noshowpoint | Do not show decimal point & trailing zeros for float values |
| scientific | Use scientific notation for printingfloat values |
| fixed | Use fixed notation for printing float values |
| ends | Insert null character to terminate an output string |
| flush | Flush the output stream |
| lock | Lock file handle |
| unlock | Unlock file handle |
| setw ( int n ) | Changes the field width for output to n |
| setfill ( char n ) | Changes the fill character to n ( default is a space) |
| setprecision ( int n ) | Changes the precision to n places after decimal point |
| setbase ( base n ) | Changes base to n, where n is 8, 10 or 16. If n is zero, output is base 10, but input uses the C convention: 10 is 10, 010 is 8, and OxC is 12 , |
| setiosflags ( fmtflags n ) | Sets format flags specified by n Setting remains in effect until next change |
| resetiosflags ( fmtflags n) | Clears only the format flags specified by n. Setting remains in effect until next change |




Comments
Log in or create a user account to comment.