在不明白的地方注释了,希望可以解释一下具体含义,谢谢
#include <iostream>
using namespace std;
#include <windows.h>
//定位到某个位置
void gotoXY(int x,int y)
{COORD coord;
coord.X=x;
coord.Y=y;
HANDLE handle=GetStdHandle(STD_OUTPUT_HANDLE);//不懂
SetConsoleCursorPosition(handle,coord);//不懂
}
int main()
{ gotoXY(10,5); //横坐标,纵坐标
cout<<"千里烟波"<<endl;
gotoXY(20,8);
cout<<"楚天阔"<<endl;
return 0;
}