home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / tutorial / cpptutor / source / usephras.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-15  |  699 b   |  27 lines

  1.                              // Chapter 6 - Program 13 - USEPHRAS.CPP
  2.  
  3. #include "iostream.h"
  4. #include "phrase.h"
  5.  
  6. void main()
  7. {
  8. phrase my_text;
  9.  
  10.    cout << "The phrase is ---> " << my_text.get_phrase() << "\n";
  11.    my_text.set_noun("baseball");
  12.    cout << "The phrase is ---> " << my_text.get_phrase() << "\n";
  13.    my_text.set_verb("Throw");
  14.    cout << "The phrase is ---> " << my_text.get_phrase() << "\n";
  15.    my_text.set_noun("game");
  16.    cout << "The phrase is ---> " << my_text.get_phrase() << "\n";
  17. }
  18.  
  19.  
  20.  
  21. // Result of execution
  22. //
  23. // The phrase is --->  the
  24. // The phrase is --->  the baseball
  25. // The phrase is ---> Throw the baseball
  26. // The phrase is ---> Throw the game
  27.