RAD Studio
ContentsIndex
PreviousUpNext
clrscr

Header File 

conio.h  

Category 

Console I/O Routines 

Prototype 

void clrscr(void); 

Description 

Clears the text-mode window. 

clrscr clears the current text window and places the cursor in the upper left corner (at position 1,1).

Note: Do not use this function in Win32 GUI applications.
Return Value 

None. 

Example  

#include <conio.h>
int main(void)
{
   int i;
   clrscr();
   for (i = 0; i < 20; i++)
      cprintf("%d\r\n", i);
   cprintf("\r\nPress any key to clear screen");
   getch();
   clrscr();
   cprintf("The screen has been cleared!");
   getch();
   return 0;
}

Portability

POSIX 
Win32 
ANSI C 
ANSI C++ 
 
 
 
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!