Source Code File 07-01_cls
07-01_cls.c
#include <ncurses.h> int main() { int c,y,x,cmax; initscr(); getmaxyx(stdscr,y,x); cmax = (x * y) / 5; for(c=0;c<cmax;c++) addstr("blah "); refresh(); getch(); clear(); /* clear the screen */ refresh(); /* don't forget this! */ getch(); endwin(); return(0); }
Output Screenshot
(Click to view result.)
Notes
* The cls command was used in MS-DOS to clear the screen.
Copyright © 1997-2024 by QPBC.
All rights reserved