#include <windows.h>
static HANDLE Console = 0;
COORD Cursor;
int GotoXY ( int x, int y )
{
if ( ! Console) Console = GetStdHandle(STD_OUTPUT_HANDLE);
Cursor.X = x;
Cursor.Y = y;
return SetConsoleCursorPosition(Console, Cursor);
}
int AddXY ( int x, int y )
{
if ( ! Console) Console = GetStdHandle(STD_OUTPUT_HANDLE);
Cursor.X += x;
Cursor.Y += y;
return SetConsoleCursorPosition(Console, Cursor);
}