Is it possible to clear the screen?
GitOverHere (0)

Is it possible to clear the screen in repl.it. I want to be able to clear the screen after the player has entered some input.

You are viewing a single comment. View All
Answered by mat1 (2717) [earned 5 cycles]
View Answer
malvoliothegood (274)

You could output a heap of newlines.

void clearScreen(int numLines) {
  for (int i = 0; i < numLines; i++) {
    cout << "\n";
  } 
}

// Call the function
clearScreen(40);