Saturday, 24 December 2011

moveto

#include<graphics.h>
#include<conio.h>
 
main()
{
int gd = DETECT, gm;
char msg[100];
 
initgraph(&gd, &gm, "C:\\TC\\BIN");
 
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;
}

No comments:

Post a Comment