Want more features on Pastebin? Sign Up, it's FREE!
Guest

main()

By: darearkin on Mar 16th, 2013  |  syntax: None  |  size: 0.62 KB  |  views: 40  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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
clone this paste RAW Paste Data