What's so bad about scanf anyway???

Karl Heuer karl at ima.isc.com
Wed Nov 14 12:17:17 AEST 1990


In article <48257 at cornell.UUCP> hilfingr at cs.cornell.edu (Paul N. Hilfinger) writes:
>2. Several contributors have suggested the use of sscanf after using
>fgets.  This has problems, since sscanf won't tell you where in its
>input string it stopped reading.

Fixed in ANSI C, via the `%n' specifier.

Karl W. Z. Heuer (karl at ima.isc.com or uunet!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list