我说的是vc6下啊,肯定不行了。我下了一个gotoxy()函数,不过我不理解。

voidgotoxy(inta,intb){COORDc;c.X=a;c.Y=b;SetConsoleCursorPosition(GetStdHandle(STD_OU... void gotoxy(int a, int b)
{
COORD c;
c.X=a;
c.Y=b;
SetConsoleCursorPosition (GetStdHandle(STD_OUTPUT_HANDLE), c);
}COORD什么意思还有SetConsoleCursorPosition (GetStdHandle(STD_OUTPUT_HANDLE), c)什么意思啊?多谢啊。
展开
 我来答
wwjbuoy03
2010-06-02 · TA获得超过7688个赞
知道大有可为答主
回答量:2154
采纳率:0%
帮助的人:3618万
展开全部
SetConsoleCursorPosition
The SetConsoleCursorPosition function sets the cursor position in the specified console screen buffer.
该函数的作用是在特定的窗口中实现光标的定位.
BOOL SetConsoleCursorPosition(
HANDLE hConsoleOutput, // handle to screen buffer窗口handle
COORD dwCursorPosition // new cursor coordinates光标的坐标
);
Parameters变量
hConsoleOutput
[in] Handle to a console screen buffer. The handle must have GENERIC_WRITE access.
指向窗口的handle,必须有GENERIC_WRITE的权利
dwCursorPosition
[in] Specifies a COORD structure containing the new cursor position. The coordinates are the column and row of a screen buffer character cell. The coordinates must be within the boundaries of the screen buffer.
包含一个光标的坐标.坐标位置必须不超出窗口.
Return Values
If the function succeeds, the return value is nonzero.
如果函数执行成功,返回非0
If the function fails, the return value is zero.
如果执行失败,返回0
To get extended error information, call GetLastError.

Remarks
The cursor position determines where characters written by the WriteFile or WriteConsole function, or echoed by the ReadFile or ReadConsole function, are displayed. To determine the current position of the cursor, use the GetConsoleScreenBufferInfo function.

If the new cursor position is not within the boundaries of the screen buffer's window, the window origin changes to make the cursor visible.
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式