我组译都没错可是要RUN就发生错误了我是用TURBO C程式RUN的有人能告诉我吗?
#include<dos.h>
#include<stdio.h>
#include<graphics.h>
#include<math.h>
union REGS regs;
unsigned int zhuan;
int Msinit();
void Setmouse(int left,int right,int top,int buttom);
int Msread(int *xp,int *yp,int *bup);
void Draw(int x,int y,int sizex,int sizey);
main()
{int mode=VGAHI,driver=VGA;
unsigned int l;
int i,gi,gj,j,flag=1;/*i,j是循??量,flag是???量,-1:向x?半?移?,+1:向x正半?移?*/
double qx,qy,k,b=0.0,speech=0.4,x,y;
double r=2.0,bx=60.0,byy=270.0;
double pianx=100.0,piany=100.0,tx=20.0,ty=10.0,jx=2.0,jy=2.0;
int mx=0,my=0,mb,sum;/*sum????的?目*/
FILE * p;
if((p = fopen("xia.txt", "r")) == NULL)
{printf("The file cannot open!\n");
exit(1);}
initgraph(&driver,&mode,"\\tc\\BGI");
Msinit();
Setmouse((int)(pianx+1+bx/2),(int)((tx+jx)*8+pianx-1-bx/2),(int)byy+piany,(int)byy+piany);
star:cleardevice();/*程序重?的介入?*/
sum=0;
qx=100.0+pianx-10;qy=180.0+pianx-10;k=0.33;
setcolor(7);
rectangle((int)(pianx-2),(int)(piany-2),(int)((tx+jx)*8+2+pianx),302+piany);
setcolor(1);
rectangle((int)(pianx-1),(int)(piany-1),(int)((tx+jx)*8+1+pianx),301+piany);
/*?取?面情?*/
for(i=0;i<5;i++)
fscanf(p,"%x ",&zhuan);
/*???*/
for(i=0;i<5;i++)
{l=1;
for(j=0;j<16;j++)
{if((zhuan&l)==0)
{Draw((int)((jx+tx)*((16*i+j)%8)+pianx+jx),(int)((jy+ty)*((int)((16*i+j)/8))+piany+jy),
(int)tx,(int)ty);
sum+=1;
}
l=l*2;
}
}
for(;;)
{ setfillstyle(1, 0);
bar(mx-bx/2,my,mx+bx/2,my+5);
Msread(&mx, &my, &mb);
Draw(mx-bx/2,my,bx,5);
setcolor(0);
circ ..
访客只能看到部份内容,免费 加入会员 或由脸书 Google 可以看到全部内容