御坂快乐的说 御坂快乐的说
关注数: 9 粉丝数: 24 发帖数: 172 关注贴吧数: 16
在做课设时遇到了一系列的问题,求大神指点!!!! void Draw(int *GamePhase,int *mx,int *my,int *level,int *score,int *picleft,bool *isMouseDown,Block block[11][11],Block preview[4][4],bool *is1,bool *is2,bool *is3,bool *is4,bool *is5,bool *is6,bool *is7,int *ini,int *inj,bool *isRightHere,bool *isInGame,int *kind,bool *NotCreated,int *test,int *fuck,bool *isRefresh,bool *shit,int *PicStyle,int *CannotPlant,int *roundendleft,bool *preisChange,bool *blockisChange,bool *isPrint,bool *isSet,int *maxlevel,bool *isGameOver,char name[]) { setlinecolor(WHITE); switch(*GamePhase) { case 0:StartDraw(&is1,&is2,&is3,&is4,&is5,&is6,&is7);break; case 1:GamingDraw(GamePhase,mx,my,level,score,picleft,isMouseDown,block,preview,is1,is2,is3,is4,is5,is6,is7,ini,inj,isRightHere,isInGame,kind,NotCreated, test,fuck,isRefresh,shit,PicStyle,CannotPlant,roundendleft,preisChange,blockisChange,isPrint,isSet,maxlevel,isGameOver,name); break; case 2:GamingPause(GamePhase);//FIN break; case 3: Roundraw(GamePhase,mx,my,level,score,picleft,isMouseDown,block,preview,is1,is2,is3,is4,is5,is6,is7,ini,inj,isRightHere,isInGame,kind,NotCreated, test,fuck,isRefresh,shit,PicStyle,CannotPlant,roundendleft,preisChange,blockisChange,isPrint,isSet,maxlevel,isGameOver); break; case 4: Setting(GamePhase,mx,my,level,score,picleft,isMouseDown,block,preview,is1,is2,is3,is4,is5,is6,is7,ini,inj,isRightHere,isInGame,kind,NotCreated, test,fuck,isRefresh,shit,PicStyle,CannotPlant,roundendleft,preisChange,blockisChange,isPrint,isSet,maxlevel,isGameOver,name); break; case 5: RankDraw(GamePhase,mx,my,level,score,picleft,isMouseDown,block,preview,is1,is2,is3,is4,is5,is6,is7,ini,inj,isRightHere,isInGame,kind,NotCreated, test,fuck,isRefresh,shit,PicStyle,CannotPlant,roundendleft,preisChange,blockisChange,isPrint,isSet,maxlevel,isGameOver,name); break; case 6:HelpDraw(GamePhase,mx,my,level,score,picleft,isMouseDown,block,preview,is1,is2,is3,is4,is5,is6,is7,ini,inj,isRightHere,isInGame,kind,NotCreated, test,fuck,isRefresh,shit,PicStyle,CannotPlant,roundendleft,preisChange,blockisChange,isPrint,isSet,maxlevel,isGameOver); break; case 7:Exit(GamePhase,isMouseDown,isInGame);//FIN 问题在这里!!!!!! break; } } void Exit(int *GamePhase,bool *isMouseDown,bool *isInGame) //这里是子函数 { HWND wnd = GetHWnd(); if (MessageBox(wnd, _T("您要退出游戏吗?"), _T("_(:з」∠)_"), MB_OKCANCEL | MB_ICONQUESTION) == IDOK) { closegraph(); exit(0); } else{ if(*isInGame)*GamePhase=1; else*GamePhase=0; *isMouseDown=false; } } vc6.0报的错是error C2660: 'Exit' : function does not take 3 parameters。。。。完全不明白了,我整个人顿时不好了,还有好多处这样的问题。。。。。求大神帮忙!!!!
求大神帮忙!!!!!! #include<stdlib.h> #include<stdio.h> #include<windows.h> struct RankNode{ char name[16]; char score_char[7]; int score_int; RankNode *next; }; void main() { int i,j,k,sb; FILE *fp1,*fp2; char ch; char final[300]; bool isNext; isNext=true; if( ( fp1=fopen("rank.txt","r") )==NULL )//这里是文件名,要填入所要读取的txt文件名 { MessageBox(0, ("排行榜文件读取失败!"), ("错误!"), MB_OK | MB_ICONERROR); exit(0); //if(isInGame)GamePhase=1; //elseGamePhase=0; //IsMouseDown=false; } i=0; RankNode *H,*p,*s,*now; RankNode **L=&H; *L=(RankNode*)malloc(sizeof(RankNode)); now=(RankNode*)malloc(sizeof(RankNode)); p=*L; p->next=NULL; ch = fgetc( fp1 ); while(i<10)//从文件中读取排行榜 { s=(RankNode*)malloc(sizeof(RankNode)); j=0; while((ch!=',')&&(j<16)) { s->name[j] = ch; ch = fgetc( fp1 ); j++; } s->name[j] = '\0'; k=0; ch = fgetc( fp1 ); while((ch!=';')&&(k<7)) { s->score_char[k] = ch; ch = fgetc( fp1 ); k++; } s->score_char[k] = '\0'; p->score_int=atoi(p->score_char); i++; s->next=NULL; p->next=s; p=s; ch = fgetc( fp1 ); } p=H->next; while(p!=NULL)//打印预览 { printf("%s",p->name); printf(" "); printf("%s",p->score_char); printf("\n"); p=p->next; } printf("Please enter your name:");//录入新数据 scanf("%s",now->name); printf("Please enter your score:"); scanf("%s",now->score_char); now->score_int=atoi(now->score_char); p=H->next; if(now->score_int>p->score_int) { H->next=now; now->next=p; isNext=false; } if(isNext)//入口控制 { i=0; while((p!=NULL)&&(i<10))//插入排序 { s=p; if((now->score_int>s->next->score_int)&&(p->next!=NULL)) { now->next=s->next; p->next=now; break; } p=p->next; i++; } } p=H->next; i=0; while((p!=NULL)&&(i<10))//打印显示(限制前十个) { printf("%s",p->name); printf(" "); printf("%s",p->score_char); printf("\n"); p=p->next; i++; } /////////////////////////////////////写入文件////////////////////////////// fclose(fp1); if( ( fp2=fopen("fuck.txt","w+"))==NULL ){ MessageBox(0, ("排行榜文件读取失败!"), ("错误!"), MB_OK | MB_ICONERROR); exit(0); //if(isInGame)GamePhase=1; //elseGamePhase=0; //IsMouseDown=false; } p=H->next; i=0;sb=0; while((p!=NULL)&&(i<10))//录入 { j=0; while(p->name[j]!='\0') { fputc(p->name[j],fp2); j++; } fputc(',',fp2); k=0; while(p->score_char[k]!='\0') { fputc(p->score_char[k],fp2); k++; } fputc(';',fp2); p=p->next; } fputc('\0',fp2); fclose(fp2); }
1 下一页