You have to remember that this code is only inputting one charecter:
cout << "Do you want the correct answers? (Type yes or no)\n";
char x;
cin >> x;
Because
char only can hold one charecter, you'll need an array of letters to be able to hold a response that's more than one letter long. For example:
char name[200]; // holds a name up to 200 charecters
Better yet, to make it more C++, use a
string, which does not have to be an array, and instead dynamically allocates the memory needed.
Of course, you may have only been intending to hold one charecter, but then when I saw this, it made be think that you wanted to input more:
Now you've got several things wrong with this. The most obvious mistake is that you're not using quotes around the string; thus it will confuse the compiler. Secondly, unless the variable is only 1 charecter long (see previous section), you cannot compare C-style strings with ==. If you want to compare a string, you must use
strcmp(). Yet another reason to use string instead of char (strings can be compared with ==).
Lastly, this isn't entirely incorrect but...
A more portable and standard method to do this is simply to use
Hope this helps