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

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -