it's all under DOS:
1. how to clear the screen?
2. how to print something on the screen at a certain position?
3. how to print text with a different fore or backcolor?
VIsualPenguin
Printable View
it's all under DOS:
1. how to clear the screen?
2. how to print something on the screen at a certain position?
3. how to print text with a different fore or backcolor?
VIsualPenguin
You have to printf ANSI.SYS compliant escape sequences
Basically the sequnces are escape (ascii 27) [ (ascii 91)
followed by sequences of letters and numbers. When you send a number it has to be a single character, and the ascii value
For example if you want to send a 1 then
The two sequcnes I know offf the top of my headCode:char s,esc,squacket; // squacket is a square bracket
s = '1';
esc = 27;
squacket = 91;
printf("%c%c%c",esc,squacket,s);
clear screen = esc[2J
move cursor to a given position (ex: row=2, col =4 ) esc[2;4H
Go here for a description:
http://enterprise.aacc.cc.md.us/~rhs/ansi.html
1. use system("cls");
2. don't really know
3. See your MSDN, I think you can use SetConsoleTextAttribute
it's in Real DOS, not in a console.
VIP