Warning: file_get_contents(https://whois.pconline.com.cn/jsLabel.jsp?ip=127.0.0.1) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 503 Service Temporarily Unavailable in D:\wwwroot\huidong\wwwroot\function.inc.php on line 884
设置控制台光标位置 - huidong

huidong

首页 | 会员登录 | 关于争取 2022 寒假做出汇东网 Ver3.0.0 !
搜索文章


//所需头:
#include<windows.h>

// 设置光标位置
void Gotoxy(int x, int y)
{
    COORD coord;
    coord.X = x;
    coord.Y = y;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); // 移动光标
} 
 
int main()
{
    Gotoxy(x,y);//x为横坐标,即为所在行数;y为纵坐标,即为所在列数
    return 0;
}




返回首页


Copyright (C) 2018-2024 huidong