vc++里怎么不能识别gotoxy()这个函数啊

来源:百度知道 编辑:UC知道 时间:2024/06/08 14:46:12
如题

刚看了下msdn,没有你说的这个函数(vc++,标准c/c++中都没有),如果是其他平台的,vc肯定用不了

VC控制台程序实现 gotoxy

#include <windows.h>
#include <stdio.h>

int main()
{
COORD pos = {0, 0};
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);

pos.X = 5; pos.Y = 5;
SetConsoleCursorPosition(hOut, pos); /* 设置光标位置 */
printf("position: 5, 5\n");

CloseHandle(hOut);
}

gotoxy 原型:extern void gotoxy(int x, int y);
用法:#include <system.h>
功能:将光标移动到指定位置说明:gotoxy(x,y)将光标移动到指定行y和列x。

这个函数好像是TC函数库里的东西吧.