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?
Printable View
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.
stdlib.h is a standard header so the system() function can be used in any ANSI C compiler not just MSVCQuote:
Originally 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.