为什么这里要使用初始化列表Watch(Time &t):m_tTime(t){},不能使用赋值运算Watch(Time &t){m_tTime = t;}?
class Watch
{
public:
Watch(Time &t){m_tTime = t;}
void display()
{
cout << m_tTime.m_iHour << endl;
cout << m_tTime.m_iMinute << endl;
cout << m_tTime.m_iSecond << endl;
}
public:
Time m_tTime;
};