home *** CD-ROM | disk | FTP | other *** search
- // ex09008.cpp
- // Global scope resolution in base and derived classes
- #include <iostream.h>
- #include "disptime.h"
-
- main()
- {
- DispTime dt(21, 42, 12, pst);
- DispTime *dp = &dt;
-
- // -------- use the DispTime display function
- dp->display();
- cout << '\n';
- dt.display();
- cout << '\n';
-
- // -------- use the TimeZone display function
- dp->TimeZone::display();
- cout << '\n';
- dt.TimeZone::display();
- cout << '\n';
-
- // -------- use the Time display function
- dp->Time::display();
- cout << '\n';
- dt.Time::display();
- cout << '\n';
- }