Having problems with my cin

I'm trying to get back into coding so I'm a little rusty, but anyways my objective is to create just a simple conversation. The problem is that my if second if statement for some reason doesn't run I think it's because strings cannot have spaces, but is there something else than string that will let me use spaces in my cin's?

[code]
#include<iostream>
#include<string>

using namespace std;
int main(){
string reply;
//string relpy2;



cout << "What up"<< endl;
cin>> reply;


if (reply=="nothing")
cout<< "Ok see you later"<< endl;

if (cin=="the sky")
cout<< "Smart ass"<< endl;





return 0;
}

Use getline, don't use cin for strings. Cin extracts data up until you press the spacebar and discards everything after that. getline extracts all the data from one line. For example, if you enter "the sky", it will extract the and discard sky.
Ok gotcha that makes sense thanks for the help.
Topic archived. No new replies allowed.