Date: Thu, 8 Apr 1999 11:42:36 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Baldus cc: djgpp AT delorie DOT com Subject: Re: how to scan an int from the keyboard In-Reply-To: <370a258c.20926573@news.tin.it> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 6 Apr 1999, Baldus wrote: > how to scan an int from the keyboard, with allegro and the > "install_keyboard();" routines installed? > > I used to use: > scanf("%d", x); You could fetch the keyboard input into a char buffer, zero-terminate it, and then use `sscanf' instead of `scanf', with the same format.