Talk:cpp/filesystem/is empty

check if a text file is empty
I am having trouble checking if a text file is empty.

this is what I'm thinking structure wise:

while(fin >> s[i]) {

if(//file is empty) { exit(0); }

else // do stuff

}


 * re :

re:

Thanks It works :)!! Layan000 (talk) 06:38, 28 February 2021 (PST)