Is it possible to clear the output at the command prompt using C on windows?
For example, on linux I could do
printf("\033[2J");
But as far as I know windows doesn't recognise the ANSI escape codes Thanks.
EDIT: I guess I'll also need to get the cursor back to 0,0 fo r the next output after the clear...
There are many way to do that on windows.
You include conio.h
and call _clrscr();
Or you can call system("cls");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With