receiving data from user..?

i'm now struggling with the fact that i need the program to get a whole line of text, like of type string, but i can't seem to figure it out because whenever a whitespace comes in, the program explodes.



cout<<"Entre la hora y la tarea: "<<endl;
cin>>h;

t.addAt(i,h);

(h) is currently of type string, i need to receive it and save a whole string of words..

how may i do that?
Topic archived. No new replies allowed.