home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / diverses / tctnt / formiod.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-27  |  401 b   |  20 lines

  1. /* FORMIOD.CPP: Predefined Manipulators
  2. */
  3.  
  4. #include <iostream.h>
  5. #include <iomanip.h>
  6.  
  7. int main()
  8. {
  9.     int i = 11;
  10.  
  11.     cout << setw(10) <<
  12.                     setfill('-') <<
  13.                     setbase(ios::hex) <<
  14.                     setiosflags(ios::uppercase) <<
  15.                     resetiosflags(ios::right) <<  //toggle right justify flag off
  16.                     setiosflags(ios::left) <<
  17.                     i << endl;                    //output newline
  18.     return 0;
  19. }
  20.