Clear other than "system('cls')"?

is there any other way to clear the screen other than
 
system("cls")

(I'm using Dev C++)?
bump
Search the forum. It's all over the place.
I really shouldn't have even responded because I hate it when people bump their threads out of desperation. I'm aware that that hatred is somewhat unrooted but it just infuriates me.
Last edited on
sorry for that, master. new here. figured it out anyway.
I eventually used this code, if that tells you anything. (yours, maybe? if so works great btw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
void clear_screen ( void )
{
  DWORD n;                         
  DWORD size;                      
  COORD coord = {0};               
  CONSOLE_SCREEN_BUFFER_INFO csbi;
  HANDLE h = GetStdHandle ( STD_OUTPUT_HANDLE );
  GetConsoleScreenBufferInfo ( h, &csbi );
  size = csbi.dwSize.X * csbi.dwSize.Y;
  FillConsoleOutputCharacter ( h, TEXT ( ' ' ), size, coord, &n );
  GetConsoleScreenBufferInfo ( h, &csbi );
  FillConsoleOutputAttribute ( h, csbi.wAttributes, size, coord, &n );
  SetConsoleCursorPosition ( h, coord );
}
Last edited on
closed account (jwC5fSEw)
Advice: bumping after ten minutes isn't going to get you answers any faster. If anything, it'll get you them slower because people won't want to respond.
Thanks for the advice, I already learned my lesson.
Topic archived. No new replies allowed.