Oh right. I was thinking of the first cin >> input.. To replace the second one with getline, but a cin.ignore() before it or just replace both of them. The reason is that cin >> leaves a newline in input stream which is picked up by getline as an empty line.
By the way, don recursively call main(). Use a loop instead.
ok that worked, now i need to make anything the user types in, lowercase.. so when they type Hey string greeting1="hey"; evaluates correctly
and i need to make it so that if string greeting="chicken"; and string greeting1="noodles";
and a user types chicken or noodles they get cout << "and dumplings"; maybe using strcmp somehow,, idk
Just convert the user input to all upper/lower case and then check it against the responses.
1 2 3 4 5 6 7 8 9 10
char ToLower(char input)
{
//check input, convert to lower, return
}
//in main
for (int i = 0; i<someString.size(); i++)
{
someString[i] = ToLower(someString[i]);
}
To convert char's to lower case, remember that char's are actually just numbers under the hood, so 1 if statement is all that would be required to check if a char is upper/lower. Check out this page (http://cplusplus.com/doc/ascii/) for the specs.