anyone know the code to clear console screen
anyone know the code to clear console screen
That would depend on the O/S. Please check this article for multiple O/S's.
Also, you could use ncurses.
Last edited by rstanley; 04-03-2024 at 04:54 AM.
The article incorrectly calls "\e[1;1H\e[2J" a "regex".
It is, of course, an ANSI escape sequence.
ANSI escape code - Wikipedia
Even Windows seems to respond to these now, although I don't think \e is a standard character escape code in C. Alternatively, it can be written in octal \033 or hex \x1b: printf("\033[1;1H\033[2J")
A little inaccuracy saves tons of explanation. - H.H. Munro