Detecting End-of-file - C++
Advertisements
| Top Tutorials | New Tutorials | Submit | Login | Register |
Tutorial Detail
Detecting End-of-file - C++
Detection of End-of-file condition is necessary for preventing any further attempt to read data from the file.http://www.onlinehowto.net/Tutorials/29/Detecting-End-of-file---C++/94/1
Total Hits: 4229
Total Votes: 36 votes
Category: C and C++/File Manipulation
Submitted on: 2008-04-16 01:55:05
Submitted By: Shekhar
Description:
Detection of End-of-file condition is necessary for preventing any further attempt to read data from the file. The end-of-file can be detected in two ways. The examples shows the two ways in which the end-of-file can be detected. While loop terminates when last returns a value of zero on reaching the end-of-file condition. The loop may also terminate due to otherfailures as well. eof() is a member of ios class. It returns a non-zero value if the end-of-file(EOF) is encountered and a zero otherwise. More detail...Rating Detail
| Stars | Percentage | Total Vote |
|---|---|---|
![]() |
![]() ![]() 16.67% |
6 |
![]() ![]() |
![]() ![]() 16.67% |
6 |
![]() ![]() ![]() |
![]() ![]() 16.67% |
6 |
![]() ![]() ![]() ![]() |
![]() ![]() 16.67% |
6 |
![]() ![]() ![]() ![]() ![]() |
![]() ![]() 16.67% |
6 |





16.67%

16.67%

16.67%

16.67%

16.67%