簡體   English   中英

使用 Gotoxy(int x,int y)

[英]Use of Gotoxy(int x,int y)

我是 C 新手,gotoxy 函數有什么用? 我讀到它只能在控制台中使用。這是什么意思? 有人可以給我一個以合法方式使用它的例子嗎?

你的谷歌技能很弱。 嘗試“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;
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM