I have looked through a lot of books and still cant find out how to do these two things:
1)how do you clear the screen?(ie get rid of all the text)
2) how do you change the font size of the text?
Printable View
I have looked through a lot of books and still cant find out how to do these two things:
1)how do you clear the screen?(ie get rid of all the text)
2) how do you change the font size of the text?
real dos or console?
what?
system ("c l s")
header is <stdlib.h> i think
with borland its clrscr or something .
use the help on your compiler.
are you running a DOS looking window(the console) in windows? or is it pure DOS?
Dos in a window
from the Board Faq:
Code:
#include <windows.h>
void clrscr()
{
COORD coordScreen = { 0, 0 };
DWORD cCharsWritten;
CONSOLE_SCREEN_BUFFER_INFO csbi;
DWORD dwConSize;
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
GetConsoleScreenBufferInfo(hConsole, &csbi);
dwConSize = csbi.dwSize.X * csbi.dwSize.Y;
FillConsoleOutputCharacter(hConsole, TEXT(' '), dwConSize, coordScreen, &cCharsWritten);
GetConsoleScreenBufferInfo(hConsole, &csbi);
FillConsoleOutputAttribute(hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten);
SetConsoleCursorPosition(hConsole, coordScreen);
}
thanks, now I only need to now about the font