Borland C++ reference

gotoxy

raw OCR

Positions cursor in text window.

Defined in header <conio.h>

Syntax

#include <conio.h>
void gotoxy(int x, int y);

Portability

DOSUNIXWindowsANSI CC++ only
■

Remarks

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.

Return value

None.

See also

Example

#include <conio.h>
int main (void)
{
   clrscr 0;
   gotoxy (35, 12);
   cprintf ("Hello world");
   getchO ;
   return 0;
}

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.