标签:oid handle ios ica 坐标 结构 images space col
typedef struct _COORD { SHORT X; // horizontal coordinate SHORT Y; // vertical coordinate } COORD;
#include <iostream> #include <Windows.h> using namespace std; void gotoxy(int x,int y) { COORD loc={x,y}; HANDLE hOutput=GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(hOutput,loc); } int main() { gotoxy(2,0); cout<<"Hello World!"<<endl; system("pause"); return 0; }
输出
说明:字符前有来个空格
标签:oid handle ios ica 坐标 结构 images space col
原文地址:http://www.cnblogs.com/huolong-blog/p/7586611.html