home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / cdactual / demobin / share / program / C / ANSICPP.ZIP / EX09008.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-24  |  562 b   |  29 lines

  1. // ex09008.cpp
  2. // Global scope resolution in base and derived classes
  3. #include <iostream.h>
  4. #include "disptime.h"
  5.  
  6. main()
  7. {
  8.     DispTime dt(21, 42, 12, pst);
  9.     DispTime *dp = &dt;
  10.  
  11.     // -------- use the DispTime display function
  12.     dp->display();
  13.     cout << '\n';
  14.     dt.display();
  15.     cout << '\n';
  16.  
  17.     // -------- use the TimeZone display function
  18.     dp->TimeZone::display();
  19.     cout << '\n';
  20.     dt.TimeZone::display();
  21.     cout << '\n';
  22.  
  23.     // -------- use the Time display function
  24.     dp->Time::display();
  25.     cout << '\n';
  26.     dt.Time::display();
  27.     cout << '\n';
  28. }
  29.