e function converts an ifstream object into a void pointer. It also invokes ios::fail ()
function, which is as follows:
int fail ()
{
return & (failbit | badbit | hardfail):
}
The above function returns non-zero file when end of file is not encountered. The function returns address
of object using this pointer. Zero is returned when end of file is reached. The while or if statement
checks whether the value is zero or non-zero (address of object ). Here, zero means false and non-zero means
true. The details of the above functions are discussed ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.