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?
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?
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.
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?
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.
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); }
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.