#include "stdafx.h"
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main()
{
string a;
string b = "hey";
cin >> a;
if (a == b) {
cout << "hello \n";
}
int z = 40;
string x = "";
string y = "weather";
cin >> x;
if (x == y) {
cout << "the temp is " << z << endl;
}
return 0;
}
it works correctly but once I change string y to a sentence that have spaces in it it does not work for example : string y = "this is a sentence";