RAD Studio
ContentsIndex
PreviousUpNext
gotoxy

Header File 

conio.h  

Category 

Console I/O Routines 

Prototype 

void gotoxy(int x, int y); 

Description 

Positions cursor in text window. 

gotoxy moves the cursor to the given position in the current text window. If the coordinates are in any way invalid the call to gotoxy is ignored. An example of this is a call to gotoxy(40,30) when (35,25) is the bottom right position in the window. Neither argument to gotoxy can be zero. 

Note:Do not use this function in Win32 GUI applications. 

Return Value 

None. 

Example  

#include <conio.h>
int main(void)
{
    clrscr();
    gotoxy(35, 12);
    cprintf("Hello world");
    getch();
    return 0;
}
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!