I am writing a console application that gives options to user to choose from. After each option is selected I want to clear the console screen. Since system(“cls”/“clear") calls are a bad practice and ANSI escape sequence are also non-portable.
Is there a way to achieve this behaviour without compromising the portability of the code?
EDIT: I am running OSX 10.13