64,654
社区成员
发帖
与我相关
我的任务
分享
//---------------------------------------------------------------------------
#ifndef Unit2H
#define Unit2H
//--------------------------------------------------------------------------
#include <iostream>
class TimeDL
{
private:
int m_hours;
int m_minutes;
public:
TimeDL();
TimeDL(int h = 0, int m = 0);
void AddMin(int m);
void AddHour(int h);
void Reset(int h = 0, int m = 0);
TimeDL operator +(const TimeDL &t)const;
TimeDL operator +(int h)const;
TimeDL operator -(const TimeDL &t)const;
TimeDL operator *(int f)const;
friend TimeDL operator *(int f, const TimeDL &t){return t * f;}
friend std::ostream & operator <<(const std::ostream & os, const TimeDL &t);
};
#endif