我正在阅读编程:使用C++的原理和实践(第2版)
我发现了这个问题:
这是我尝试过的:
#include <iostream>
using namespace std;
int main () {
int x, y;
while (x != '|' || y != '|'){
cin >> x;
cin >> y;
cout << x << endl;
cout << y << endl;
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
什么时候'|' 输入后,它会输出无限循环,意外输出等内容.