I'm a bit confused about what the expression belove in the code returns.
And how can it be used in a while loop:
Code:
string buf;
while(cin >> buf) //extracts until eof
;
I checked cpp reference:
Code:
Return Value
The object itself (*this).
When a value is being "extracted" it is not returned, but directly stored in the variable used as parameter.
It doesn't say anywhere that the return value is zero in case of EOF.
Does the "cin" object in our case becomes something like a NULL and then the while terminates?
I'm confused about this pointer aswell...