Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Using a referen...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 43927 of 47449
Post > Topic >>

Using a reference in a conditional statement...

by "barcaroller" <barcaroller@[EMAIL PROTECTED] > Mar 15, 2008 at 11:41 AM

I was looking at some code that uses fstream:


    #include <fstream>
    //
    // which includes:
    // istream& getline( char* buffer, streamsize num );
    //

    ifstream fin;
    while( fin.getline(line, size) ) {
        ...
    }


If fin.getline() returns a reference, how could it be used in a
conditional
statement?  I've looked at the member functions and I could not find a
conversion to a bool type.
 




 8 Posts in Topic:
Using a reference in a conditional statement...
"barcaroller" &  2008-03-15 11:41:21 
Re: Using a reference in a conditional statement...
Neelesh Bodas <neelesh  2008-03-15 09:08:56 
Re: Using a reference in a conditional statement...
"barcaroller" &  2008-03-15 12:20:52 
Re: Using a reference in a conditional statement...
Paavo Helde <nobody@[E  2008-03-15 13:17:27 
Re: Using a reference in a conditional statement...
Daniel Dearlove <danie  2008-03-15 18:26:29 
Re: Using a reference in a conditional statement...
Neelesh Bodas <neelesh  2008-03-15 09:41:20 
Re: Using a reference in a conditional statement...
James Kanze <james.kan  2008-03-16 03:11:51 
Re: Using a reference in a conditional statement...
Jerry Coffin <jcoffin@  2008-03-15 11:51:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Aug 27 18:06:51 CDT 2008.