以前的叫函数体内赋值
Time::Time(int tmphour, int tmpmin, int tmpsec)//构造函数的实现
{
Hour = tmphour;
Minute = tmpmin;
Second = tmpsec;
}
另一种 构造函数初始化 更提倡
Time::Time(int tmphour, int tmpmin, int tmpsec)
:Hour(tmphour),Minute(tmpmin)//构造函数初始化列表
{
//自己加一些其他的
Second = tmpsec;
}