From: Barry Rodewald Newsgroups: comp.os.msdos.djgpp Subject: Re: Scanf function Date: Wed, 22 Oct 1997 22:21:35 +1300 Lines: 13 Message-ID: <344DC59F.477F@hn.pl.net> References: <62fp85$nq4$1 AT power DOT ci DOT uv DOT es> NNTP-Posting-Host: bsr.hn.planet.gen.nz Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Marsel wrote: > Why the secong scanf function does not wait until the caracter is introduced > ?. the c variable always contain the caracter \010 Character 10 is a line feed. scanf accepts input until a carriage return is recieved (pushing Enter). When you push Enter, a carriage return and a line feed is sent. I would say that this is where the character 10 is coming from. To fix it, try putting a '\n' at the end of the format string (first parameter) in your scanf functions. Failing that, look at the example in the DJGPP documentation (under libc.a). Hope this helps, Barry Rodewald.