explain the concept of eof() in file handling, how possible errors are dealt with in file handling in c++. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

explain the concept of eof() in file handling, how possible errors are dealt with in file handling in c++.

29th Sep 2016, 5:28 PM
khadeeja Shamna
khadeeja Shamna - avatar
3 Answers
0
End of file is when your input stream object can no longer read any input because nothing is there to read. Now if you reach the EOF a bit is set and the program knows that you reached the end, so its common to use the EOF function in a while loop to check if you are done reading the files contents.
1st Oct 2016, 9:51 PM
Bailey Kocin
Bailey Kocin - avatar
0
hehe,I just won a challenge against you
19th May 2017, 6:41 PM
Gnanendar Reddy
Gnanendar Reddy - avatar
0
hm😐
19th May 2017, 6:43 PM
khadeeja Shamna
khadeeja Shamna - avatar