COORD是windows API中定义的一种结构,表示一个字符在控制台屏幕上的坐标。其定义为:
typedef struct _COORD {
SHORT X; // horizontal coordinate
SHORT Y; // vertical coordinate
} COORD;
 
表示一个字符在控制台屏幕上的坐标。
应用
c++中的例子:
#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(,);
cout<<"Hello World!"<<endl;
system("pause");
return ;
}

输出

说明:字符前有来个空格

最新文章

  1. spider 配置文件参考
  2. JQuery常用函数及功能小结
  3. iPhone4下window各个部分的高度
  4. 无法更新 EntitySet“SoreInfo_Table”,因为它有一个 DefiningQuery,而 &lt;ModificationFunctionMapping&gt; 元素中没有支持当前操作的 &lt;InsertFunction&gt; 元素。
  5. BZOJ4117 : [Wf2015]Weather Report
  6. .net程序集强命名(签名)
  7. (转)Fibonacci Tilings
  8. 暂时解决Sublime Text 2不支持input问题(转)
  9. 前端基础系列——CSS规范(文章内容为转载)
  10. csv操作帮助类
  11. SDOI HH的项链 HEOI采花
  12. linux vi 中s 替换方法
  13. IIS怎么设置本地域名解析(本地域名测试配置)
  14. JSP 页面传值方法总结
  15. qt pro 设置编译参数,支持 xp
  16. pip改源
  17. 程序连接oracle数据库问题Cannot create PoolableConnectionFactory ...
  18. laravel视图$errors为空
  19. android--获取屏幕高宽度工具类
  20. Linux下软件包安装

热门文章

  1. Draw the RGB data from kinect C++ via opengl
  2. Java中AtomicInteger的使用!!!
  3. hdoj--1034--Hidden String(dfs)
  4. string类自定义字符串替换函数replace
  5. sql阻塞进程查询
  6. Android Retrofit网络请求Service,@Path、@Query、@QueryMap、@Map...
  7. mybatis集成到spring理解
  8. Conventions and patterns for multi-platform development
  9. noip 2018 day1 T2 货币系统 完全背包
  10. 最新华为数通HCNP-随堂培训视频课程 大牛讲解高清带实验