In books and websites you frequently see examples where the getline function from <string> is used for example like this:
I was wondering what value getline actually returns so that the loop stops? All references I can find say that it returns the stream it was reading, but how can a stream suddenly become 0 or false or anything like that?Code:while (getline(istream, str))
cout << str << endl;