home *** CD-ROM | disk | FTP | other *** search
- //: C18:Iosexamp.cpp
- // From Thinking in C++, 2nd Edition
- // Available at http://www.BruceEckel.com
- // (c) Bruce Eckel 1999
- // Copyright notice in Copyright.txt
- // Iostream examples
- #include <iostream>
- using namespace std;
-
- int main() {
- int i;
- cin >> i;
-
- float f;
- cin >> f;
-
- char c;
- cin >> c;
-
- char buf[100];
- cin >> buf;
-
- cout << "i = " << i << endl;
- cout << "f = " << f << endl;
- cout << "c = " << c << endl;
- cout << "buf = " << buf << endl;
-
- cout << flush;
- cout << hex << "0x" << i << endl;
- } ///:~
-