Scaring scanf() (Was: Help with strings)

Leo de Wit leo at philmds.UUCP
Sat Jun 18 08:47:07 AEST 1988


This is a SERIOUS newsgroup, but still ...

In article <4390 at haddock.ISC.COM> karl at haddock.ima.isc.com (Karl Heuer) writes:
<In article <1793 at akgua.ATT.COM> brb at akgua.ATT.COM (Brian R. Bainter) writes:
<< [lots of stuff about 'annoying, buggy scanf()']...
< [Karl explains the correct use of scanf() and that it is perfectly safe...]
<If you want to ignore all input up to and including the newline, you can add
<"%*[^\n]%*c" to the end of the scanf format.
<
<Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint

That will do to scare him (scanf) off, I think ... 8-)

	Leo.



More information about the Comp.lang.c mailing list