Jack Klein <ja*******@spamcop.net> writes:
[...]
There is absolutely no way at all to implement any sort of video
display control directly in standard C. C does not talk to devices
like keyboards, video displays, printers, etc. All C input and output
is defined in terms of FILE * streams prototyped in <stdio.h>. It is
up to the underlying operating system to connect these streams to disk
files or devices.
Basically true, but I think it overstates it a bit. There is no
*portable* way to implement video display control in standard C, but
you can implement it non-portably (given a few assumptions) without
resorting to any non-standard features or libraries. Such code
depends on implementation-defined behavior. (For example, if you
assume a VT100-style or xterm-style terminal, you can write control
codes to stdout.)
But the best way to do this kind of thing is usually to use some
system-specific library such as curses, ncurses, or whatever Windows
provides.
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.