User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 426,485 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,193 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums

End Of File (ifstream)

Join Date: Feb 2008
Posts: 513
Reputation: Jennifer84 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
Jennifer84 Jennifer84 is offline Offline
Posting Pro

End Of File (ifstream)

  #1  
May 10th, 2008
If I am reading a .txt file with ifstream, what is the syntax to recognice if I have reached the end of file. From what I have heard somewhere before, I think it has with eof to do ?

ifstream File("C:\\File1\\");
std::string Line;

while( getline(File, Line, ',') )
{

        if (         ?           )   // end of file ?

        {
   
        }            
} 
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 4:41 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC