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 / INTRO33.CPP < prev    next >
C/C++ Source or Header  |  1992-02-18  |  435b  |  19 lines

  1. //INTRO33.CPP--Example from Chapter 3, "An Introduction to C++"
  2.  
  3. #include <iostream.h>
  4.  
  5. int main()
  6. {
  7.    int intvar = 10;
  8.    int *intptr;
  9.    intptr = &intvar;
  10.  
  11.     cout << "\nLocation of intvar: " << &intvar;
  12.     cout << "\nContents of intvar: " << intvar;
  13.     cout << "\nLocation of intptr: " << &intptr;
  14.     cout << "\nContents of intptr: " << intptr;
  15.     cout << "\nThe value that intptr points to: " << *intptr;
  16.  
  17.    return 0;
  18.