Message-ID: <344D0490.45DE@cs.com> Date: Tue, 21 Oct 1997 19:37:52 +0000 From: "John M. Aldrich" Reply-To: fighteer AT cs DOT com Organization: Two pounds of chaos and a pinch of salt MIME-Version: 1.0 To: Eli Zaretskii CC: djgpp AT delorie DOT com Subject: Re: Scanf function References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Eli Zaretskii wrote: > > John's analysis is very accurate. Therefore, a simple solution is to > change the format of the second `scanf', so it does skip whitespace: > > printf("Write a character: "); > scanf(" %c",&c); Oh, gods yes. Thank you, Eli - I totally forgot about that, since I seldom use scanf() in my own programs. -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com | | "Starting flamewars since 1993" | http://www.cs.com/fighteer | | *** NOTICE *** This .signature is generated randomly. | | If you don't like it, sue my computer. | ---------------------------------------------------------------------