testing a condition with istream objects
I was trying to read a lot of numbers dynamically using the code below followed by EOF at the end

    vector<double> data;
    double x;
    while(cin>>x)
    {
      data.pushback(x);
    }
this method is working great but i would like to know what is happening with the expression below

    cin>>x
Yeah i know that it is used to input the data but how come i'm able to test conditions with it.

and what happens with the expression below

    while(cin) or if(cin)

what does 'cin' return?

Any help would be great.Thanx :)
testing a condition with istream objects
===

I was trying to read a lot of numbers dynamically using the code below followed by EOF at the end

    vector<double> data;
    double x;
    while(cin>>x)
    {
      data.pushback(x);
    }
this method is working great but i would like to know what is happening with the expression below

    cin>>x
Yeah i know that it is used to input the data but how come i'm able to test conditions with it.

and what happens with the expression below

    while(cin) or if(cin)

what does 'cin' return?

Any help would be great.Thanx :)