#include<bits/stdc++.h>
#include<conio.h>
#include<windows.h>
#include<io.h>
using namespace std;
class A{
public:
int a;
};
class B{
public:
int a;
};
operator>(const A& a,const B& b){
return 9;
}
int main(){
A c;B d;
cout<<(c>d);
return 0;
}
9
Process exited after 0.5311 seconds with return value 0
请按任意键继续. . .
就是说,重载运算符的返回值不是bool?