int main(){
string def = "DEF";
string abc = "ABC";
bool test = def > abc;
cout << test << endl; // 1
test = "DEF" > "ABC";
cout << test << endl; // 0
return 0;
}
输出
很明显,第一个输出是我们想要的答案(DEF的ASCII码比ABC大)
第二个输出我不知道是以什么为依据得出这样的结果。一定要注意写法