C++中Time类的类声明及成员函数的实现。
C++中Time类的类声明及成员函数的实现。
日期:2012-08-19 18:17:30 人气:1
自己测试一下,这是我即时写的,仅供参考
class Timer
{
int h,m,s;
public:
Timer()
{
h=0;m=0;s=0;
}
void Set(int i,int j,int k)
{
h=i;m=j;s=k;
}
int GetH() const {return h;}
int GetM const {return m;}
int GetS const {return s;}
};