Question on displaying text at screen coordinates
I need help on how to display text in screen coordinates and not rely in \t control characters. Thanks
Solution for Windows:
1 2 3 4 5 6 7 8 9
|
void gotoxy( int column, int line )
{
COORD coord;
coord.X = column;
coord.Y = line;
SetConsoleCursorPosition(
GetStdHandle( STD_OUTPUT_HANDLE ),coord);
}
|
If you are using Linux, you'll have to use Curses library.
EDIT: You can use Curses on Windows too.
Last edited on
Topic archived. No new replies allowed.