Lets see this program:
ifstream filein("hey.txt");
if(filein.eof()){
cout<<"END"<<endl;
}
Here "hey.txt" is empty. So the if condition here is thought should have been true But it isnt
Why isnt the eof returning true although the file is empty?
If i added this before the if
the eof returns true although arr
is still empty and the file is still empty so both unchanged
char arr[100];
filein.getline(arr,99);