4
Type, I know that the function feof() returns 0 if it did not find a file end and that it requires 1 parameter, which is the pointer_pra_variável_tipo_FILE, so far so good.
If I do the while so it works like the other down but I don’t understand how.
while(!feof(ponteiro_pra_variavel_tipo_FILE)) {
}
It wouldn’t be right to test like this ?
while(feof(ponteiro_pra_variavel_tipo_FILE) == 0){
}
How does he know through !feof(ponteiro_pra_variavel_tipo_FILE)
, that the function is returning 0
?
Related useful reading (in English): Why is "while ( !feof (file) )" Always Wrong?
– bfavaretto