#pragma once #include #include #include #include #include HANDLE hConsole; HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); void GotoXY(int X, int Y) { COORD coord = { X, Y }; SetConsoleCursorPosition(hStdOut, coord); } enum ConsoleColor { Black = 0, Blue = 1, Green = 2, Cyan = 3, Red = 4, Magenta = 5, Brown = 6, LightGray = 7, DarkGray = 8, LightBlue = 9, LightGreen = 10, LightCyan = 11, LightRed = 12, LightMagenta = 13, Yellow = 14, White = 15 }; void SetColor(int text, int background) { HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hStdOut, (WORD)((background << 4) | text)); } char s1[256]; char *Rus (char *s2) { AnsiToOem(s2,s1); return s1; }