home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c063 / 1.ddi / EXAMPLES.ZIP / INTRO33.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-18  |  435 b   |  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.