Alright, I got it to work, with the help of nano and the standard libraries -----> these -
algorithm complex exception list stack
bitset csetjmp fstream locale stdexcept
cassert csignal functional map strstream
cctype cstdarg iomanip memory streambuf
cerrno cstddef ios new string
cfloat cstdio iosfwd numeric typeinfo
ciso646 cstdlib iostream ostream utility
climits cstring istream queue valarray
clocale ctime iterator set vector
cmath deque limits sstream
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
enum Country
{
USA,
China,
Russia,
France,
NorthK,
Iran
};
Country country;
int choice;
cout << "Pick a country.\n";
cout << " 1. usa\n 2.france\n 3.china\n 4.russia\n 5.northk\n 6.iran\n";
cin >> choice;
switch( choice )
{
case 1:
country = USA;
break;
case 2:
country = China;
break;
etc...
}
|
BUT.
Is there any way for me to be able to just type in say
USA or France and it be able to recognize it and match with "Usa" or "France"?