I am trying to make a program that asks for an answer that is a string, however I cannot make it recognize the correct answer. Any help would be appreciated.
Thank you in advanced!
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
string answer;
cout << "Stomy = ";
cin >> answer;
if (answer == "new opening")
{
cout << "Correct!";
}
else if (answer != "new opening")
{
cout << "Incorrect :(" << endl;
}