I have a little routine that’s run under Linux and Windows written in C and displays output on the console. I’m not linking in any form of curses or anything like that.
Currently I clear the screen using
#ifdef __WIN32 system( 'cls' ); #else system( 'clear' ); #endif
Then I have a bunch of printf statements to update the status. What I’d like just reset the screenpointer to 0,0 so I can then just overlay my printfs. I’d rather avoid compiling in any more extensions especially since I’m coding for 2 different OS’.
Looks like I may have found a windows specific way of doing it SetConsoleCursorPosition
Ansi escape sequence \033[0;0H for Linux – just printf that to the console.