Advertisement
darearkin

main()

Mar 16th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. // CISP400V7A4.cpp
  2. #include <iostream>
  3. using std::cout;
  4. using std::endl;
  5.  
  6. #include "Time.h" // include Time class definition
  7. #include "Date.h" // include Date class definition
  8.  
  9. const int MAX_TICKS = 30000;
  10.  
  11. int main()
  12. {
  13. Time t(23, 59, 58);// create a time object
  14.  
  15. Date d(12, 31, 2011, t); // create date object
  16.  
  17. // output Time object t's values
  18. for ( int ticks = 1; ticks < MAX_TICKS; ++ticks )
  19. {
  20. d.print(); // invokes print
  21. cout << endl;
  22. d.tick(); // invokes function tick
  23. } // end for
  24. d.~Date();// call Date destructor
  25. system("PAUSE");
  26. return 0;
  27. } // end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement