1  #ifndef HEAD
 2  #define HEAD
 3  #include <iostream>
 4  #include <string>
 5
 6  #endif
 7
 8  /**********************************************************
 9  * Second example C++ program in Lippman on page 21 of text*
10  * Preprosor commands added for practice                   *
11  * namespace directive added for completeness              *
12  * \n is replaced with the macro endl                      *
13  *    Ruben Saifr June 29th, 2008                          *
14  **********************************************************/
15
16  using namespace std;
17
18  int main(){
19          string word;
20          while( cin >> word)
21                  cout << "word read is: " << word << endl;
22  #ifdef DEBUG
23          cout << "what was that word?\n" << word << '\n';
24  #endif
25
26          cout << "ok: No more words to read: bye!" << endl;
27          return 0;
28  }
29
30
31
32
33