I want to know: how to clean screen on an UNIX-based system? I searched on the Internet, but I\'ve just found how to do it on Windows: system(\"CLS\") I don\'t want exactly
You can use the following code which use termcap for clear screen. (don't forget to link with the library)
#include #include #include void clear_screen() { char buf[1024]; char *str; tgetent(buf, getenv("TERM")); str = tgetstr("cl", NULL); fputs(str, stdout); }