Re: scanf??? read??? vga.h vgagl.h

Search this archive.

From: Bart Oldeman (Bart.Oldeman@bristol.ac.uk)
Date: Sun 27 Aug 2000 - 15:05:36 IDT


On Sat, 26 Aug 2000, Nicolas Raitman wrote:

> I im new, and i just sent a message but since my mail account is not working
> properly this is going to be the first and last time in which i will send
> the mail again so please sorry!!!
> 
> Im new and i really need help
> 
> I want to do something like
> this
> 
> scanf("%f", &x);
> 
> do u understand?
> 
> When i use scanf while using the vga graphics scanf seems not to work. In
> the first place no character is printed to the screen while im typing,
> besides, when after ttying to do the scanf i do a gl_copyscreen call the
> number doesnt appear.
> 
> So what function should i use? Am i using scanf in a wrong way? Do I have to
> use another function?? If so, which one and how??

Look at the svgalib printftest.c demo. While there is not direct scanf, it
can show what you type on the screen. If you then put these contents in a
buffer string, say b, you can use 
sscanf(b, "%f", &x); 
to convert to a float.

Bart


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST