Why can't I run even system("cls") in Code Playground? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Why can't I run even system("cls") in Code Playground?

Even if the console had just this function, Some of my C++ codes would become a lot better than before. Is there any alternative that I can use here?

6th Sep 2017, 4:42 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
2 Answers
+ 2
What system("cls") actually does is calling the CLS (CLear Screen) command in Windows CMD (Command Prompt). Therefore there's no way to replicate this behaviour in Code Playground to my knowledge. P/S: Try type "cls" without quotes in Windows CMD and you'll get what I mean.
6th Sep 2017, 4:54 PM
Zephyr Koo
Zephyr Koo - avatar
+ 2
I realize now that they don't want people messing with the server. But if they can't give cls, can't they give us a cursor setting function like SetConsoleCursorPosition() from windows.h? //BTW, <windows.h> can be included here on SoloLearn, plus its functions are even recognized by the intellisense part of CodePlayground, and those functions just don't work as expected. // Plus those functions don't even return errors...
6th Sep 2017, 6:09 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar