Hello,
I can't seem to find the cause of this error message, can anyone help ??
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
#include "DateAndTime.h"
/*void incrementMinutes( DateAndTime &, const int );*/
int main()
{
DateAndTime dt;
int choice;
do
{
cout << "\n\n Select a function\n\n"
<< " Command Description \n\n"
<< " Enter S Execute the set functions\n"
<< " G Execute the get functions\n"
<< " R Execute run parameter functions menu\n"
<< " D Execute display functions\n"
<< " 5 to show standard date and time \n"
<< " 6 to show military date and time \n"
<< " ------------------------------------------- \n"
<< " E to exit\n";
cin >> choice;
switch (choice)
{
case 'S':
cout << "Set functions\n";
break;
case 'G':
cout << "Get functions\n";
break;
case 'R':
cout << "Run functions\n";
break;
case 'P':
cout << "Problem exercises\n";
break;
case 'E':
cout << "End of Program\n";
break;
default:
cout << "Invalid Selection, Try S, G, R, P, E\n";
}
} while (choice != 'E');
dt.setHour( 17 );
dt.setMinute( 34 );
dt.setSecond( 25 );
cout << "Result of setting all valid values:\n"
<< " Hour: " << dt.getHour()
<< " Minute: " << dt.getMinute()
<< " Second: " << dt.getSecond();
dt.setHour( 234 ); // invalid hour set to 0
dt.setMinute( 43 );
dt.setSecond( 6373 ); // invalid second set to 0
cout << "\n\nResult of attempting to set invalid hour and\n"
<< " Hour: " << dt.getHour()
<< " Minute: " << dt.getMinute()
<< " Second: " << dt.getSecond() << "\n\n";
dt.setDateAndTime(10, 21, 2001, 11, 58, 0 );
int spin_me;
cout << "Enter the number of times to spin this: ";
cin >> spin_me;
cout << "\nSpinning the counters " << spin_me
<< " times:\nStart time: ";
dt.printStandard();
cout << "\nTime: ";
dt.ticks( dt, spin_me);
cout << "\n";
return (0);
}
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
|