May 2012
Intermediate to advanced
679 pages
16h 56m
English
Table D.1 summarizes various manipulators. It may be recalled that to use parameterized manipulators, we have to include file “iomanip.h”.
Table D.1 Manipulators from TURBO C++ 3.0
| Manipulator | Purpose/what it does |
|---|---|
| dec | Converts to decimal |
| oct | Converts to octal |
| hex | Converts to hex |
| endl | Inserts newline and flushes the output stream |
| ends | Inserts null character to terminate and output string |
| Flush | Flushes the output stream |
| setw(int n) | Changes the field width for output to n |
| setfill(char n) | Changes the fill character to n( default character is space) |
| setprecision(int n) | Changes the precision to n places after the decimal point |
| setbase( base n) | Output sets the base to 8,10 or 16 |
| setiosflags ... |
Read now
Unlock full access