Public paste
main.cpp
By: Jazy | Date: Oct 2 2007 05:14 | Format: C++ | Expires: never | Size: 745 B | Hits: 1294

  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 tmp,tmp2;
  17.  
  18.     cout<<"Please Enter a time...n";
  19.     cout<<"Hour: ";
  20.     cin>>hours;
  21.     cout<<"Minutes: ";
  22.     cin>>minutes;
  23.     cout<<"Seconds: ";
  24.     cin>>sec;
  25.     cout<<"Please enter TimeZone: ";
  26.     cin>>z;
  27.     zone[0] = z[0];
  28.     zone[1] = z[1];
  29.  
  30.     tmp.setTime(hours,minutes,sec);
  31.     tmp.setZone(zone);
  32.     cout<<tmp;
  33.     tmp2.setTime(12,12,12);
  34.     tmp2.setZone(zone);
  35.     tmp + tmp2;
  36.     if (tmp == tmp2)
  37.       cout<<"They are equaln";
  38.       else
  39.         cout<<"They aren't equaln";
  40.  
  41.         return 0;
  42. }
  43.  
  44.