| www.delorie.com/archives/browse.cgi | search |
| Date: | Thu, 8 Apr 1999 11:42:36 +0200 (IST) |
| From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
| X-Sender: | eliz AT is |
| To: | Baldus <bioba AT tin DOT it> |
| 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: | <Pine.SUN.3.91.990408114130.29868W-100000@is> |
| MIME-Version: | 1.0 |
| Reply-To: | djgpp AT delorie DOT com |
| X-Mailing-List: | djgpp AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
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.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |