home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Ebooks / Thinking in C++ V2 / C18 / Iosexamp.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-25  |  558 b   |  31 lines

  1. //: C18:Iosexamp.cpp
  2. // From Thinking in C++, 2nd Edition
  3. // Available at http://www.BruceEckel.com
  4. // (c) Bruce Eckel 1999
  5. // Copyright notice in Copyright.txt
  6. // Iostream examples
  7. #include <iostream>
  8. using namespace std;
  9.  
  10. int main() {
  11.   int i;
  12.   cin >> i;
  13.  
  14.   float f;
  15.   cin >> f;
  16.  
  17.   char c;
  18.   cin >> c;
  19.  
  20.   char buf[100];
  21.   cin >> buf;
  22.  
  23.   cout << "i = " << i << endl;
  24.   cout << "f = " << f << endl;
  25.   cout << "c = " << c << endl;
  26.   cout << "buf = " << buf << endl;
  27.  
  28.   cout << flush;
  29.   cout << hex << "0x" << i << endl;
  30. } ///:~
  31.