include windows HANDLE Console COORD Cursor int InitConsoleHandle retu

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <windows.h>
HANDLE Console;
COORD Cursor;
int InitConsoleHandle ()
{
return (Console = GetStdHandle(STD_OUTPUT_HANDLE));
}
int GotoXY ( int x, int y )
{
Cursor.X = x;
Cursor.Y = y;
return SetConsoleCursorPosition(Console, Cursor);
}
int AddXY ( int x, int y )
{
Cursor.X += x;
Cursor.Y += y;
return SetConsoleCursorPosition(Console, Cursor);
}