Lecture overview -- Keyboard shortcut: 'u'  Previous page: Stream State -- Keyboard shortcut: 'p'  Next page: More manipulators -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 2 - Page 35 : 42
Notes about C++
Basic facilities
Manipulators

A manipulator is a distinguished operand accepted by the << and >> IO operators

A manipulator mutates the state of a stream

  • The C++ Programming Language: Page 631
 

  cout << 17 << endl << showbase 
       <<  hex << 17 << endl
       << oct << 17 << endl;

Output manipulators.

y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/io/manipulators-1.ccThe fragment in a complete program.


y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/io/manipulators-1-outputProgram output.