[求助]用c语言实现的小球碰撞运动-->yms123转移
程序好下:运行的时候有如附件图里的错误,运行的路径是对的,哪个大虾可以指教一下,由于c版论坛没什么光顾只能到这里发贴了!#include <stdio.h>
#include <graphics.h>
int main()
{
int i,gdriver,gmode,size;
void *buf;
gdriver=DETECT;
initgraph(&gdriver,&gmode," ");
setbkcolor(BLUE);
cleardevice();
setcolor(LIGHTRED);
setlinestyle(0,0,1);
setfillstyle(1,10);
circle(100,200,30);
floodfill(100,200,12);
size=imagesize(69,169,131,231);
buf=malloc(size);
getimage(69,169,131,231,buf);
putimage(500,269,buf,COPY_PUT);
for(i=0;i<185;i++)
{
putimage(70+i,170,buf,COPY_PUT);
putimage(500-i,170,buf,COPY_PUT);
}
for(i=0;i<185;i++)
{
putimage(255-i,170,buf,COPY_PUT);
putimage(315+i,170,buf,COPY_PUT);
}
getch();
closegraph();
}