Hey, I have written the following code:
#include <graphics.h>
#include <dos.h>
#include <conio.h>
main()
{
int i, j = 0, gd = DETECT, gm;
initgraph(&gd,&gm,“C:\TC\BGI”);
settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(25,240,“Press any key to view the moving circle”);
getch();
setviewport(0,0,639,440,1);
for( i = 0 ; i <= 420 ; i = i + 10, j++ )
{
circle(50+i,410,10);
delay(100);
if( i == 420 )
break;
clearviewport();
}
getch();
closegraph();
return 0;
}
Now, I need help on how can I make it move or roll on a straight line.
Secondly, how can I insert a spoke into it.