I want to make a program that would talk with someone but I have started learning C++ only 2 days ago so now I don't understand what to do to get rid of this error. I want program to "cout" Hello if someone typed "Hello" but it doesn't work :( It says:
A value of type "const char*" cannot be assigned to an entity of type "int".
I tried to change "int" to char, long long, unsigned char, unsigned long long, unsigned int but it didn't work :D
#include <iostream>
#include <conio.h>
using namespace std;
int main() {
int Answer;
cout << "Hello! I'm a new born AI.";
cin >> Answer;
if (Answer = "Hello") //ERROR IS HERE {
cout << "Hello" << endl;
}
}
_getch();
return 0;
}