osx - How do I clear the screen in C? -


i want clear text on screen. have tried using:

#include <stdlib.h> sys(clr); 

thanks in advance! i'm using os x 10.6.8. sorry confusion!

the best way clear screen call shell via system(const char *command) in stdlib.h:

system("clear"); //*nix 

or

system("cls"); //windows 

then again, it's idea minimize reliance on functions call system/environment, can cause kinds of undefined behavior.


Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -