IntelliSense: no instance of constructor "Watch::Watch" matches the argument list argument types are: (Time)
class Watch
{
public:
?Watch(Time t) :m_tTime(t.m_iHour,t.m_iMinute,t.m_iSecond)
?{
?}
?void display()
?{
??cout << m_tTime.m_iHour << endl;
??cout << m_tTime.m_iMinute << endl;
??cout << m_tTime.m_iSecond << endl;
?}
public:
?Time m_tTime;
};
類Watch是這樣實現的,但是運行后錯誤列表里針對mian中Watch w(t);有個:IntelliSense: no instance of constructor "Watch::Watch" matches the argument list argument types are: (Time)。不知道怎么修改,神奇的是不影響運行出結果。
2018-08-21
我把你的代碼跑了一下發現沒問題啊,也沒有編譯錯誤,你是不是別的部分有問題?貼出來看看