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

  1. /* CINCOUTB.CPP: I/O using cin and cout
  2.  
  3.         This program inputs an integer from the keyboard and puts it
  4.         into the variable 'i' using the overloaded member operator>>.
  5.         The next statement outputs the variable to stdout using the
  6.         overloaded member operator<<.  Since the overloaded insertion
  7.         and extraction operators used above are members of CIN or COUT,
  8.         they can alternatively be called using the dot member access
  9.         operator.
  10. */
  11.  
  12. #include <iostream.h>
  13.  
  14. //*******************************************************************
  15. int main()
  16. {
  17.         int i;
  18.  
  19.         cin.operator>>( i );
  20.         cout.operator<<( i );
  21.  
  22.         return 0;
  23. } // end of main()
  24.  
  25.