Source of TestStuff62.cpp


  1: //TestStuff62.cpp

  2: //Tuesday, Apr 03, 2014

  3: 
  4: #include <iostream>

  5: #include <fstream>

  6: #include <string>

  7: #include <iomanip>

  8: #include <cstdlib>

  9: using namespace std;
 10: 
 11: #include "utilities.h"

 12: using Scobey::Pause;
 13: 
 14: #include "utilities.h"

 15: 
 16: int main(int argc, char* argv[])
 17: {
 18:     Time t1(1,2,3);
 19:     cout << t1;
 20:     t.increment();
 21:     cout << t1;
 22: 
 23:     Time* tPtr = new Time();
 24:     cout << tPtr << endl;
 25:     cout << *tPtr << endl;
 26: 
 27:     (*tPtr).increment();
 28:     //Parentheses needed since . has higher precedence than *

 29: 
 30:     cout << *tPtr << endl;
 31: 
 32:     tPtr->increment();
 33:     //Equivalent to, and more concise than, (*tPtr).increment() above

 34: 
 35:     cout << *tPtr << endl;
 36: }