Quote:
Originally Posted by ChevyCowboy15
is that right?
what would come next?
or is there a shorter way of doing this?
|
Something like this should do (obviously you'd have to modify it a bit for whatever you're doing)
#include <iostream>
#include <string>
using namespace std;
int main() {
string corrects[2] = { "Winston Churchill", "Churchill" };
string input;
getline(cin,input);
if (input == corrects[0] || input == corrects[1])
// do stuff
return 0;
}