Sorry why are you using a char for getting a string response, he is the fix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
//random9
#include <iostream>
#include <string>
usingnamespace::std
int main()
{
// what are the ints for
string response; // getting a string input
cout << "Do you like me?" << endl;
cin >> response; // Only take first word as input
if (response == "yes") { // why the cin? And double quotes thanks Disch
cout << "Good." << endl;
}
return 0;
}
@Stephanie
You should have int as return type for the main function to tell the operating system of success or not. Main function with no return type is also non-standard.