moveto() function

moveto function changes the current position (CP) to (x, y).

Declaration of moveto() function

void moveto(int x, int y);

C programming code for moveto()

#include <graphics.h> 
#include <conio.h>
main()
{
	int gd = DETECT, gm; 
	char msg[100];
	initgraph(&gd, &gm, "C:\\ TurboC3\\BGI"); 
	sprintf(msg, "X = %d, Y = %d",getx(),gety()); 
	outtext(msg);
	moveto(50, 50);
	sprintf(msg, "X = %d, Y = %d", getx(), gety()); 
	outtext(msg);
	getch(); 
	closegraph(); 
	return 0;
}