using namespace std;
int main()
{
int optionvalue = 0; string option;
cout << "welcome to the simple text game!";
do
{
cout << "\n\nplease select one of the following options:" << endl;
cout << " 1: play \n";
cout << " 2: help \n";
cout << " 3: option \n";
cout << " 4: quit \n";
cin >> option; optionvalue = atoi( option.c_str() );
//atoi() converts a char * to an int. returns 0 if input is not an int.
if (optionvalue == 0)
cout << "error: you did not enter an integer value?! please try again!"<< endl;
it shows:
: fatal error C1075: end of file found before the left brace '{'. was matched
1> Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========