is there any way in c to clear the console
ie in dos you would use cls
pascal clrscr
how do you do it in c?
is there any way in c to clear the console
ie in dos you would use cls
pascal clrscr
how do you do it in c?
If you are using MS Visual C++, it will be
First declare the header file #include<stdlib.h>
and the clear console function is system("CLS")
Thanks alot i needed it for a project which has to be in in twenty mins thanks
This topic is discussed in the FAQ.
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens
stdlib.h is a standard header so the system() function can be used in any ANSI C compiler not just MSVCOriginally Posted by bennyho03
>stdlib.h is a standard header so the system() function can be used in any ANSI C compiler not just MSVC
Using "CLS" as an argument is not quite as portable though. Then there are the "other" issues with system.
My best code is written with the delete key.