Look t this code plz:
#include
using namespace std;
int main()
{
enum object {s,k,g};
object o,t;
cout << \"Player One:
Do you expect to be able to type "s", "k", or "g" and have it parse those into your enum type? If so, you need to define your own stream operator, like this:
std::istream& operator>>(std::istream& is, object& obj) {
std::string text;
if (is >> text) {
if (is == "s") {
obj = s;
}
// TODO: else-if blocks for other values
// TODO: else block to set the stream state to failed
}
return is;
}