Home > Back-end >  Defines the date, time and date/time comprehensive, overloading, -, -,=,>=, <=,==,!=operator,
Defines the date, time and date/time comprehensive, overloading, -, -,=,>=, <=,==,!=operator,

Time:09-17

Defines the date, time and date/time comprehensive, overloading the +, -, + +, -,=, & gt;=, & lt;===,!=operator, you can set the time, date, compare the size of the time and date, time, date object operation, and output the result of a variety of formats,
Improvement requirements:
1, the original date of application class output function of the week there is an error, can not output on Friday, modify the program, the error correction, all of the results in the output date to a week, according to
2, the date class cDate_t overloaded operators +, implement a date object plus the number of days to get a new date; Overloaded operators - and realize a date object minus the number of days to get a new date and modification date minus the date object - overloaded operators, the result is not a date object, but a number of days, all the operation should be considered a leap year,
3, in class time cTime_t overloaded operator, +, to implement a time object plus a minute to get a new time. Overloaded operators - and realize a object to send minutes to get a new time, modify time object object overloaded operators - minus the time, the result is not another time object, but a number of minutes, at the same time, should consider the result and the addend is on the same day, if not, should make this clear in the result,
4, modify the structure of the integrated CTDmanage redefine the date and time for a derived class, also define constructors, all kinds of operator overloading function, implements comprehensive comparison, the integrated object plus minutes is equal to a new comprehensive object, comprehensive minus the minutes is equal to a new comprehensive object, etc., and override input/output function,
5, modify the structure of the main function, USES the way of menu options, one by one test three classes defined in a variety of functions and operators
If you can solve this problem (private chat), there will be a ChongXie and generous rewards, up to three days!!!!!!

CodePudding user response:

The built-in TDateTime class is not working?