while (1)
{
fscanf(.....)
...
if (feof(cad)) break;
}
No.
You don't really want to do all the "..." if fscanf() put cad into EOF state, such that...
Type: Posts; User: whiteflags
while (1)
{
fscanf(.....)
...
if (feof(cad)) break;
}
No.
You don't really want to do all the "..." if fscanf() put cad into EOF state, such that...
Either method like breaking a string apart or just using fscanf should work. Your code has two problems that both must be fixed: first, your using feof() wrongly as this page explains.
Secondly,...