not quite, along the right lines though.
I myself would do something like this
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string correct1 [2] = {"Winston Churchill", "Chruchill"};
string input1;
cout << "Who was the Prime Minister of England during WWII?\n";
getline(cin, input1);
return 0;
}
I understand there may be a few new concepts in there but strings are good to look into for something like this. getline(), may also be new to you. Don't worry have a look at a
reference and you should be fine with it.
Once you have got the user's input you will want to look at checking to see if the input matches either of the 2 entries in your array.
for(int i = 0; i < 2; i++){
if(correct1[i] == input1){
cout << "Congratulations, you got it!";
}
}
I hope none of that confuses you too much.
one final thing to consider is what happens if i type in "winston churchill" or "Winston cHurchill", are these wrong?
i'm happy to explain anything your unclear about
Chris