Mail Archives: djgpp/1998/11/02/23:50:34
Christian Herold wrote:
>
> Hello!
>
> Is the fscanf-function as good as any other function (like fgets) for
> file input? Or are there any disadvantages?
The right tools for the right job. `fscanf' is good for reading bits of
ASCII data from a text file, if it's in some pre-determined format.
It's not so good if the input format is fuzzy, since it can be thrown
way off if something it expects isn't where you expect it. Sometimes
`fgets' with `sscanf' can help. And, of course, it's of very little use
when reading binary files.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -