このコードを見てください:
#include <iostream>
using namespace std;
int main()
{
enum object {s,k,g};
object o,t;
cout << "Player One: "; cin >> o;
cout << "Player Two: "; cin >> t;
if (o==s && t==g) cout << "The Winner is Player One.\n";
else if (o==k && t==s) cout << "The Winner is Player One.\n";
else if (o==g && t==k) cout << "The Winner is Player One.\n";
else if (o==g && t==s) cout << "The Winner is Player Two.\n";
else if (o==s && t==k) cout << "The Winner is Player Two.\n";
else if (o==k && t==g) cout << "The Winner is Player Two.\n";
else cout << "No One is the Winner.\n";
return 0;
}
コンパイル中に次のエラーが発生no match for 'operator>>' in 'std::cin >> o
します。コードブロックを使用しています。では、このコードの何が問題なのですか?