词条 | gotoxy |
释义 | 原型:extern void gotoxy(int x, int y); 用法:#include <system.h> 功能:将光标移动到指定位置说明:gotoxy(x,y)将光标移动到指定行y和列x。设置光标到文本屏幕的指定位置,其中参数x,y为文本屏幕的坐标。 gotoxy(0,0)将光标移动到屏幕左上角 程序举例1: #include <system.h> main() { int i; char *scrbuf=(char *)0x280; for(i=0;i<85;i++) scrbuf='+'; UpdateLCD(0x00); gotoxy(2,2); getchar(); move(2,2); getchar(); return 0; } 程序举例2: 下面这个例子将在屏幕中央输出“hello world” #include <conio.h> int main(void) { clrscr(); gotoxy(35, 12); cputs("Hello world"); getch(); return 0; } gotoxy仅在TC及BC下可以使用。 |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。