I want to use clear screen function in my c++ code on repl
As repl provides ubuntu compiler for c++, I don't know how to use clear screen function and which header file will be used for that function. kindly guide me.
Outputting certain codes to some terminals (including the one repl.it uses) can do specific things to the terminal depending on the code.
\033[2J clears the screen and resets the cursor and the
\033[0;0H moves the cursor to 0,0 (again)
You can change the
Y;X to move the cursor to line
Y and column
X thus allowing you to overwrite only certain portions of your screen. Handy for games and such.