home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK4 / SAMPLES / IOSTUTOR / EXIOS201.CP$ / EXIOS201
Encoding:
Text File  |  1991-11-25  |  378 b   |  22 lines

  1. // exios201.cpp
  2. // A custom manipulator with an integer parameter
  3. #include <iostream.h>
  4. #include <iomanip.h>
  5.  
  6. ostream& fb( ostream& os, int l )
  7. {
  8.    for( int i=0; i < l; i++ )
  9.         os << ' ';
  10.    return os;
  11. }
  12.  
  13. OMANIP(int) fillblank( int l )
  14. {
  15.    return OMANIP(int) ( fb, l );
  16. }
  17.  
  18. void main()
  19. {
  20.     cout << "10 blanks follow" << fillblank( 10 ) << ".\n";
  21. }
  22.