Testing a stream object in a while statement
Hi,
I am puzzled by this fact that how a stream object be tested in a while statement. A stream object by itself does not return anything. If it does carry a "value" where is that value stored?...Could someone please explain
For example
Code:
ifstream infile("TEST.TXT");
while(infile)
{
//do something
}
How does a stream object take "values" and how does it get changed when certain operations are done on this object.
Also, do all objects carry a "value"?
Thanks
sudar