我是 C 新手。 gotoxy 函数有什么用?我读到它只能在控制台中使用。这是什么意思?有人可以给我一个合法使用它的例子吗?
问问题
2753 次
1 回答
4
你的谷歌技能很弱。试试“gotoxy conio man”:http ://code-reference.com/c/conio.h/gotoxy 。
高氧
void gotoxy(int x, int y);
将光标放在屏幕上所需的位置。
示例代码:
#include <stdio.h>
#include <conio.h>
int main( void )
{
int x, y;
x = 42;
y = 42;
clrscr();
gotoxy(x, y);
printf("gotoxy jumps to cursor position x42 y42.");
getch();
return 0;
}
于 2014-08-15T15:15:08.287 回答