Skip to content
How to clear screen in repl.it C++
Profile icon
SpartanDoge

I need a function that can clear my console screen on this website. I do know the method of printing 50 lines, but that is not what I am looking for.

You are viewing a single comment. View All
Profile icon
Geocube101

Here

void clear() { std::cout << "\033[2J\033[1;1H"; }
Profile icon
SpartanDoge

@Geocube101
Thank you, it worked.