home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / OTHERUTI / TCPP30-3.ZIP / EXAMPLES.ZIP / INTRO8.CPP < prev    next >
C/C++ Source or Header  |  1992-02-18  |  305b  |  15 lines

  1. //INTRO8.CPP--Example from Chapter 3, " An Introduction to C++"
  2.  
  3. #include <iostream.h>
  4.  
  5. int main()
  6. {
  7.   int    val = 1;
  8.  
  9.     cout << "\nval is " << val++ << " and then post-incremented\n";
  10.     cout << "val is now " << val << "\n";
  11.     cout << "val is pre-incremented to " << ++val << '\n';
  12.  
  13.     return 0;
  14. }
  15.