
3条回答 默认 最新
快乐鹦鹉 2021-09-17 13:49关注错的厉害啊。TV是类,又不是变量,怎么能TV.***呢
TV myTV;
myTV.SetStation(10);
TV myOtherTV;
myOtherTV.SetStation(2);
你没有定义有参构造函数,就不能写 TV myOtherTV(2);本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
错的厉害啊。TV是类,又不是变量,怎么能TV.***呢
TV myTV;
myTV.SetStation(10);
TV myOtherTV;
myOtherTV.SetStation(2);
你没有定义有参构造函数,就不能写 TV myOtherTV(2);