Possible Duplicate:
Reading a full line of input
I came across this snippet of code as a way to input a string (not a c string of char type) and have it read the whole line rather than stopping at the first space. Can someone give me an actual example of this where I want to input the line until a newline character is hit?
istream& getline(istream& ins, string& strVar);