home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK4 / SAMPLES / CPPTUTOR / REFADDR.CP$ / REFADDR
Encoding:
Text File  |  1991-12-12  |  361 b   |  16 lines

  1. // REFADDR.CPP
  2.  
  3. // This is an example program from Chapter 3 of the C++ Tutorial. This
  4. //     program shows that the address of a variable and the address of
  5. //     a reference to that variable are the same.
  6.  
  7. #include <iostream.h>
  8.  
  9. void main()
  10. {
  11.    int actualint = 123;
  12.    int &otherint = actualint;
  13.  
  14.    cout << &actualint << ' ' << &otherint;
  15. }
  16.