Public paste
main.cpp
By: jazy | Date: Oct 2 2007 19:24 | Format: C++ | Expires: never | Size: 892 B | Hits: 1210

  1. #include <iostream>
  2. #include <string>
  3. #include "clockType.h"
  4.  
  5. using namespace std;
  6.  
  7.  
  8. int main()
  9. {
  10.  
  11.     int hours;
  12.     int minutes;
  13.     int sec;
  14.     string z;
  15.     char zone[2];
  16.     extClockType a,b;
  17.  
  18.     cin>>a;
  19.     cout<<"Please enter TimeZone: ";
  20.     cin>>z;
  21.     zone[0] = z[0];
  22.     zone[1] = z[1];
  23.     a.setZone(zone);  
  24.     cout<<a;
  25.     // Clock Number 1 is completely setup.. lets do number 2.. ya c'mon //
  26.     cin>>b;
  27.     cout<<"Please enter TimeZone: ";
  28.     cin>>z;
  29.     zone[0] = z[0];
  30.     zone[1] = z[1];
  31.     b.setZone(zone);  
  32.     cout<<b;
  33.  
  34.  
  35.     a + b;
  36.     if (a == b)
  37.       cout<<"They are equaln";
  38.       else
  39.         cout<<"They aren't equaln";
  40.  
  41.     cout<<"Increment it by a second....n";
  42.     ++a;
  43.     cout<<"Printing then incrementing again....n";
  44.     a++;
  45.     cout<<"Test the second increment..n";
  46.     cout<<a;
  47.  
  48.         return 0;
  49. }
  50.  
  51.