-2
我得到运行时错误,谁能弄清楚为什么会出现在这个节目的无限通话和线路做操作函数调用无限
这里去我的代码
class opOverload{
public:
bool operator==(opOverload temp){
if(*this == temp){
cout << "both same";
return true;
}
else{
cout <<"both different";
return false;
}
}
};
int main() {
// your code goes here
opOverload a1,a2;
a1==a2;
return 0;
}
你认为'* this == temp'会打电话吗? – Chad
安装一个调试器就可以解决这个问题 – deW1
Ya Right deW1实际上我的大脑因为连续学习15个小时而感到疲倦,所以无法想出 –