How to read a character from a particular location on console?

  • Thread starter Prashanth Ellina
  • Start date
P

Prashanth Ellina

Hi,
I need to read individual characters from the console (in DOS) using
C. Is there some function like getxy(char,x,y) ?

thanks in advance,
Prashanth Ellina
 
J

Joona I Palaste

Prashanth Ellina said:
Hi,
I need to read individual characters from the console (in DOS) using
C. Is there some function like getxy(char,x,y) ?

Not in standard C, there isn't. Standard C doesn't even know there *is*
a console in the first place.
 
M

Malcolm

Prashanth Ellina said:
I need to read individual characters from the console (in DOS)
using C. Is there some function like getxy(char,x,y) ?
There may possibly be an extension to ANSI C that provides this and that
ships with your compiler.
Also you can often write these sorts of functions yourself by messing about
with the video buffer (obtained in a system-specific way).

However ANSI C offers no facilities for consoles other than stdin and
stdout, which you would know if you read the FAQ.
 
K

Keith Thompson

Hi,
I need to read individual characters from the console (in DOS) using
C. Is there some function like getxy(char,x,y) ?

There is no standard C function to do this, and there are plenty of
implementations where this isn't even possible. Try a DOS-specific
newsgroup.
 
P

Prashanth Ellina

Thanks a lot people,will try in a DOS group

Keith Thompson said:
There is no standard C function to do this, and there are plenty of
implementations where this isn't even possible. Try a DOS-specific
newsgroup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,821
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top