에 다음 코드에 라인 (48)에 오류가 점점 오전 :선언 오류가 내 코드
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <dos.h>
#include <conio.h>
void swap(int a,int b);void bar1();void bar2();
void bar3(); void bar4(); check0(); check1();
check2(); void del(); void rod1(); void rod2();
void box1();void box2();void tee1();voidtee2();
void tee3();void tee4();check3();void insert();
void again();void print();void myremove();void frame();
int score=0,spd,q,t,a=0,i,j,l[6]={300,90,315,105,301,91},p,turn,m,n;
char play='y';
static int arr[26][13];
void main(void)
{
char ch,y;
int gd= DETECT,gm,area,maxx,maxy,move,lmove,rmove;
void *buff;
initgraph(&gd,&gm,"d:\tc\bgi");
do{
turn=1;
score=0;
do{
clrscr();
cleardevice();
printf(" Enter Your Choice");
printf(" Basic Level.......... 1");
printf(" Middle Level......... 2");
printf(" Advanced Level....... 3");
printf(" Experts Level........ 4");
printf(" Professional Level... 5");
y=getch();
clrscr();
cleardevice();
if(y=='1') {spd=200; settextstyle(2,0,6);outtextxy(2,150," BasicLevel ");break;}
if(y=='2') {spd=150; settextstyle(2,0,6);outtextxy(2,150," MiddleLevel ");break;}
if(y=='3') {spd=100; settextstyle(2,0,6);outtextxy(2,150," AdvancedLevel ");break;}
if(y=='4') {spd=75; settextstyle(2,0,6);outtextxy(2,150," ExpertsLevel ");break;}
if(y=='5') {spd=50; settextstyle(2,0,6);outtextxy(2,150,"ProfessionalLevel ");break;}
}while(1);
frame();
getch();
int k,ar[2],pr[2],t[6];
randomize();
ar[0]=random(2);
pr[0]=random(6);
ar[1]=random(2);
pr[1]=random(6);
while(1)
{
printf(" score= %d",score);
a=ar[0];
p=pr[0];
l[0]=450;l[1]=250;l[2]=465;l[3]=265;l[4]=451;l[5]=251;
if(y=='1') spd=100;
if(y=='2') spd=75;
if(y=='3') spd=50;
if(y=='4') spd=30;
if(y=='5') spd=20;
print();
delay(500);
a=ar[1];
p=pr[1];
t[0]=l[0]; t[1]=l[1]; t[2]=l[2];
t[3]=l[3]; t[4]=l[4]; t[5]=l[5];
a=ar[1];
p=pr[1];
l[0]=270;l[1]=90;l[2]=285;l[3]=105;l[4]=271;l[5]=91;
getch 후 뭔가 문제가있을 것 같습니다(). 전체 소스 코드는 여기에 있습니다 :
http://codepad.org/I1cQQxJE는 오류
모든 코드를 실제로 볼 필요가 있습니까? 코드의 양을 줄이십시오. 또한, 그 일을하는 동안 당신은 자신의 대답을 찾을 수있는 가까운 기회가 될 것입니다 ... 또한 어느 라인 48 라인입니까?! –
무엇이 오류입니까? 더 자세하게 얘기해 주 시겠어요? 오류 메시지 또는 ...? – SSC