I want to clear all the text that is on the screen. I have tried using:
#include <stdlib.h>
sys(clr);
Thanks in advance! I'm using OS X 10.6.8. Sorry for the confusion!
You need to check out curses.h. It is a terminal (cursor) handling library, which makes all supported text screens behave in a similar manner.
There are three released versions, the third (ncurses) is the one you want, as it is the newest, and is ported to the most platforms. The official website is here, and there are a few good tutorials.
#include <curses.h>
int main(void)
{
initscr();
clear();
refresh();
endwin();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With