Draw the circle again but with the backgroundcolor to delete it. Then draw it on a different location.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
void main(void)
{
int x = 100, y = 100, radius = 50;
initwindow(1080, 720);
setcolor(GREEN);
while (!kbhit())
{
circle(x, y, radius);
delay(200);
setcolor(BLACK);
circle(x, y, radius);
x += 10;
setcolor(GREEN);
circle(x, y, radius);
}
}
Play around a bit with the delay and move distance.
I started C++ yesterday.. managed to make a circle
If you just started C++ then I suggest you find a modern compiler and a modern graphics package. That graphics package you're using is so outdated it should be abandoned.
Yes, it is outdated, 2004 is a long time ago when talking about computer graphics programs. Also this started as a partial hack of the Borland DOS BGI graphics library that had become outdated.
But since the OP stated that he is just starting his C/C++ programming journey I would recommend staying away from graphics until he masters the core language.