Need help in graphic.h

Closed
kartooooos
Posts
1
Registration date
Tuesday February 2, 2016
Status
Member
Last seen
February 2, 2016
- Feb 2, 2016 at 09:30 PM
below is the code which i intend to run but the problem is, i cant move the moon in output as desired,,can anybody help FYI the output should show the moon moving without the white color spreading to the whole screen bcoz of the floodfill,,THANKS in advance

#include<iostream.h>
#include<stdlib.h>
#include<graphics.h>
#include<conio.h>
#include<dos.h>
void main()
{
int x,y,j,i;
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:/tc/bgi ");
outtextxy(350,350,"GOOD NIGHT JI");
for(j=0;j<=200;j++)
{
circle(200+j,200,50);
setfillstyle(1,15);
floodfill(200+j,200,15);
setcolor(0);
setfillstyle(1,0);
circle(180+j,180,50);
floodfill(180+j,180,0);
delay(10);
}
for (i=0;i<1000;i++)
{
x = random(1500);
y = random(1500);
putpixel(x,y,15);
}
getch();
closegraph();
}