How can I use "cin" to allow entry of an enum type in C++?
My code is as follows:
enum Cards {TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN,
JACK, QUEEN, KING, ACE};
Cards hand1 = ACE,
hand2 = ACE;
cout<<"Player#1 - Pick a card (2 - A): ";
cin>>hand1;
cout<<"Player#2 - Pick a card (2 - A): ";
cin>>hand2;
I'm getting a lot of syntax errors with this..
Any suggestions?
Thanks,