i was trying to use a if statement so that when you enter yes or no diferent strings come up. i was wondering if you can do that. my code looks like this:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string name;
string hi;
cout << "hello im Cbuddy, what is your name?";
cin >> name;
string answer;
string yes;
cout << "oh hello "; cout << name; cout << " have we met before?" << endl;
cin >> answer;
if(answer==yes){cout<<"oh now i remember you"<<endl};
else{cout<<"oh well its nice to meet you"<<endl};
system ("pause");
return 0;
}
the lines in red are the ones that my debugger found were wrong, although i think the real problem is how i defined answer and yes.
then again im pretty new to c++ so i could be totaly wrong on all this stuff.