标签:
#include <windows.h>
//编译环境:VC6.0
void hide_cursor()
{
CONSOLE_CURSOR_INFO cursor_info = {1, 0}; //0代表光标不可见
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
}
void goto_xy(int x, int y)
{
HANDLE hout; //定义窗口句柄
COORD c; //定义坐标
c.X = x;
c.Y = y;
hout = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hout, c); //设置光标位置
}
标签:
原文地址:http://www.cnblogs.com/wby1211/p/5540872.html