osx - How do I clear the screen in C? -
this question has answer here:
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
Post a Comment