Синтаксическая ошибка склонения в строке 120. Пожалуйста, исправьте мою программу, написанную turbo C++
/- пожалуйста, исправьте это..
#include<iostream.h> #include<conio.h> #include<fstream.h> #include<string.h> #include<stdlib.h> #include<io.h> #include<graphics.h> float convert1 (char a[]) { float num1; num1=atof(a); return num1; } void convert2 (char a1[],int a) { ultoa(a,a1,10); } struct seat { int row; int column; int flag; }s[17][7]; struct account { char name[20]; char password[20]; }; account a; void passwordget(char pass_word[]) { clrscr(); int i,j; cout<<endl<<"\t"<<"enter password:="" "<<endl<<"\t"; for(i="0;i<20;i++) start: { pass_word[i]=getch(); if" (pass_word[i]="=13) { clrscr(); cout<<endl<<"\t"<<"ENTER" "<<endl<<"\t"; for(j="0;j<=i-1;j++) cout<<"*"; break; } else" if(pass_word[i]="=8) { i=i-1; clrscr(); cout<<endl<<"\t"<<"ENTER" start; } else { cout<<"*"; } } } void="" confirmget(char="" con_firm[]) { clrscr(); int="" i,j; cout<<endl<<"\t"<<"confirm="" if(con_firm[i]="=8) { i=i-1; clrscr(); cout<<endl<<"\t"<<"CONFIRM" start; } else { cout<<"*"; } } void="" encrypt(char="" _line[200],int="" &linelen) { char="" key="#" ; linelen="strlen(_line); for(int" i="0;i<linelen;" i++) { _line[i]="_line[i]^((key+i)%225); } } void" elongate(char="" &len) { char="" ; len="strlen(_line); for(int" j="0;j<len;" j++) { _line[j]="_line[j]^((key+j)%225); } void" accounts() { clrscr(); retrystart: clrscr(); int="" choice; int="" flag1="0; cout<<endl<<"\t"<<"TO" continue,="" please="" login!"<<endl; cout<<endl; cout<<"\t"<<"what="" do="" you="" want="" to="" ?"<<endl; cout<<endl; cout<<"\t"<<"1.="" create="" account"<<endl; cout<<endl; cout<<"\t"<<"2.="" login="" with="" existing="" account"<<endl; cout<<endl; cout<<"\t"<<"3.="" exit"<<endl; cout<<endl; cout<<"your="" choise:="" "; cin="">>choice; char username[20],password[20],confirm[20]; int i; switch(choice) { case 1: { retrycreate: clrscr(); fstream file; file.open("accounts.txt",ios::in,ios::app); cout<<endl<<"enter user="" name:="" "; cin="">>username; for(i=0;i<10000;i++) { file>>a.name>>a.password; if(strcmpi(username,a.name)==0) { cout<<endl<<"\t"<<"an account="" already="" exist"<<endl<<"please="" try="" with="" different="" name"<<endl<<"\t"; getch(); goto="" retrycreate; } } file.close(); ofstrem="" fin("accounts.txt",ios::app); strcpy(a.name,username); for(i="0;i<20;i++) { a.password[i]='\0'; confirm[i]='\0'; } passwordget(a.password); confirmget(confirm); a.password[strlen(a.password)-1]='\0'; confirm[strlen(confirm)-1]='\0'; if(strcmp(a.password,confirm)==0) { int" stringlength="0; encrypt(a.password,stringlength); fin<<a.name<<"\t"<<a.password; fin<<endl; cout<<endl<<"\t"<<"account" created"<<endl<,"\t"; getch(); ofstream="" close(); goto="" retrysignin; } else { cout<<"\t"<<"please="" check="" your="" password="" and="" again."<<endl<<"\t"; getch(); file.close(); goto="" retrycreate; } } case="" 2: { retrysignin: clrscr(); cout<<endl<<"\t"<<"sign="" in="" details="" "="" <<endl<<"\t"; fstream="" file; cout<<endl<<"\t"<<"enter="" username:="" "<<endl<<"\t"; cin="">>username; int len1; for(i=0;i<20;i++) password[i]='\0'; passwordget(password); password[strlen(password)-1]='\0'; clrscr(); ifstream fin("accounts.txt"); for(i=0;i<10;i++) { for(int j=0;j<20;j++) { a.name[j]=a.password[j]='\0'; } fin>>a.name>>a.password; int stringlength=0; elongate(a.password,stringlength); if(strcmp(a.name,username)==0) { if(strcmp(a.password,password)==0) { cout<<endl<<"\t"<<"correct information="" press="" any="" key="" to="" continue"; flag1="1; getch(); break; } } } if(flag1=0) { cout<<endl<<"\t"<<"Wrong" user="" name="" or="" password.="" try="" again..."; getch(); goto="" retrystart; } break; } case="" 3: exit(0); break; default: { cout<<endl<<"\t"<<"invalid="" choise="" again"; getch(); goto="" retrystart; } } } void="" firstpage() { int="" gdriver="DETECT,gmode; initgraph(&gdriver,&gmode,"C:\\Turboc3\\BGI"); int" maxx.maxy; maxx="getmaxx(); maxy=getmaxy(); setcolour(CYAN); rectangle(0,0,maxx,maxy); rectangle(3,3,maxx-3,maxy-3); setcolor(YELLOW); settextstyle(TRIPLEX_FONT,HORIZ_DIR,8); outtextxy(150,50,"WELOCME"); outtextxy(250,150,"TO"); outtextxy(50,250,"HEY" cinema"); settextstyle(triplex_font,horiz_dir,8); outtextxy(200,400,"press="" continue!"); getch(); closegraph(); clrscr(); } void="" savetostructure(char_lines[120][120]) { clrscr(); int="" i; char="" row1[2],column1[3],flag1[2]; int="" row,column,flag; for(i="0;i<120;i++) { int" len="strlen(_lines[i]); if(len==5) { row1[0]=lines[i][0]; column1[0]=_lines[i][2]; column1[1]='\0'; flag1[0]=_lines[i][4]; } else" if(len="=6) { row1[0]=lines[i][0]; column1[0]=_lines[i][2]; column1[1]=_lines[i][3]; flag1[0]=_lines[i][5]; } row=atof(row1); column=atof(column); flag=atof(flag1); s[column][row].row=row; s[column][row].column=column; s[column][row].flag=flag; } getch(); } int" createfilename(char="" _final[]) { clrscr(); char="" movienum[2],venuenum[2],timenum[2]; retrymovie: cout<<endl<<"\t"<<"which="" movie="" do="" you="" want="" watch\n\t1.endgame\n\t2.it\n\t"; cin="">>movienum; if ((strcmp(movienum,"1")==0||(strcmp(movienum,"2")==0)) { retryvenue: cout<<endl<<"\t"<<"where do="" you="" want="" to="" watch="" movie="" 1.fun="" 2.brook"; cin="">>venuenum; if ((strcmp(venuenum,"1")==0||(strcmp(venuenum,"2")==0)) { retrytime: cout<<endl<<"\t"<<"time 1.="" or="" 2."; cin="">>timenum; if ((strcmp(timenum,"1")==0||(strcmp(timenum,"2")==0)) { char needed1[2]="_"; char needed2[5]=".txt"; strcpy(_final,movienum); strcat(_final,needed1); strcat(_final,venuenum); strcat(_final,needed1); strcat(_final,timenum); strcat(_final,needed2); ofstream open(_final,ios::app); ofstream close; char c[100]; int ctr=0; fstream files(_final,ios::in); while(!files.eof()) { files.getline(c,100,'\n'); ctr++; } if(ctr==1) { cout<<"\n\n\t"<<"TO CHECK THE AVAILABILITY OF SEATS FOR THE GIVEN SHOW. PRESS ANY KEY TWICE"; getch(); return 0; } else { cout<<"\n\n\t"<<"TO CHECK THE AVAILABILITY OF SEATS FOR THE GIVEN SHOW. PRESS ANY KEY TWICE"; getch(); return 1; } } else cout<<"\n\t"<<"Try again..."; goto retrytime; } else cout<<"\n\t"<<"Try again"; goto retryvenue; } else cout<<"\n\t"<<"Try again"; goto retrymovie; } void iffirst(char _final[]) { fstream file; int row,column,flag; file.open(_final,ios::app); for(row=0;row<7;row++) { for(column=0;column<17;column++) { flag=0; file<<row<<"_"<<column<<"_"<<flag; file<<endl; } } file.close(); } void booking(char="" _lines[120][20],char="" final[20]) { int="" num; cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"; cout<<"how="" many="" seats="" do="" you="" want="" to="" book?"<<endl; cin="">>num; char needed[2]="_"; char zero[2]="0"; char one[2]="1"; char row[2], column[3]; char complete[20],complete2[20]; int i,j; for(i=0;i<num;i++) { ifstream files(final,ios::in); for(j="0;j<120;j++) { files">> _lines[j]; } files.close(); ofstream open(final,ios::out); ofstream close(); ofstream file(final,ios::app); re: row[0]=row[1]=column[0]=column[1]=column[2]='\0'; startnew: cout<<endl<<"seat "<<i+1; cout<<endl<<"row="" (a-g):"; cin="">>row; if ((row[0]=='a')&&(row[1]=='\0'))row[0]='0'; else if ((row[0]=='b')&&(row[1]=='\0'))row[0]='1'; else if ((row[0]=='c')&&(row[1]=='\0'))row[0]='2'; else if ((row[0]=='d')&&(row[1]=='\0'))row[0]='3'; else if ((row[0]=='e')&&(row[1]=='\0'))row[0]='4'; else if ((row[0]=='f')&&(row[1]=='\0'))row[0]='5'; else if ((row[0]=='g')&&(row[1]=='\0'))row[0]='6'; else if ((row[0]=='A')&&(row[1]=='\0'))row[0]='0'; else if ((row[0]=='B')&&(row[1]=='\0'))row[0]='1'; else if ((row[0]=='C')&&(row[1]=='\0'))row[0]='2'; else if ((row[0]=='D')&&(row[1]=='\0'))row[0]='3'; else if ((row[0]=='E')&&(row[1]=='\0'))row[0]='4'; else if ((row[0]=='F')&&(row[1]=='\0'))row[0]='5'; else if ((row[0]=='G')&&(row[1]=='\0'))row[0]='6'; else { cout<<"invalid row"; goto startnew; } cout<<"columns(1-15):"; cin>>column; if((column[0]=='1'&&(column[1]=='\0')) column[0]='0'; else if((column[0]=='2'&&(column[1]=='\0')) column[0]='1'; else if((column[0]=='3'&&(column[1]=='\0')) column[0]='2'; else if((column[0]=='4'&&(column[1]=='\0')) column[0]='3'; else if((column[0]=='5'&&(column[1]=='\0')) column[0]='4'; else if((column[0]=='6'&&(column[1]=='\0')) column[0]='6'; else if((column[0]=='7'&&(column[1]=='\0')) column[0]='7'; else if((column[0]=='8'&&(column[1]=='\0')) column[0]='8'; else if((column[0]=='9'&&(column[1]=='\0')) column[0]='9'; else if((column[0]=='1'&&(column[1]=='0')&&(column[2]=='\0')) { column[0]='1'; column[1]='0'; } else if((column[0]=='1')&&(column[1]=='1')&&(column[2]=='\0')) { column[0]='1'; column[1]='2'; } else if((column[0]=='1')&&(column[1]=='2')&&(column[2]=='\0')) { column[0]='1'; column[1]='3'; } else if((column[0]=='1')&&(column[1]=='3')&&(column[2]=='\0')) { column[0]='1'; column[1]='4'; } else if((column[0]=='1')&&(column[1]=='4')&&(column[2]=='\0')) { column[0]='1'; column[1]='5'; } else if((column[0]=='1')&&(column[1]=='5')&&(column[2]=='\0')) { column[0]='1'; column[1]='6'; } else { cout<<endl<<"invalid column"; goto="" startnew; } strcpy(complete,row); strcat(complete,needed); strcat(complete,column); strcat(complete,needed); strcat(complete,zero); cout<<endl; strcpy(complete2,row); strcat(complete2,needed); strcat(complete2,column); strcat(complete2,needed); strcat(complete2,one); for(j="0;j<120;j++) { if(strcmpi(complete2,_lines[j])==0) { cout<<"THIS" seat="" is="" already="" booked!="" please="" choose="" a="" different="" seat!"<<endl; goto="" re; } else if(strcmpi(complete,_lines[j])="=0) { file<<complete2<<endl; } else file<<_lines[j]<<endl;" } file.close(); } if(num) { cout<<"amount="" payable:"<<num*100<<endl; cout<<"your="" seat(s)="" have="" been="" reserved!="" \nplease="" take="" screenshot="" of="" this="" screen="" and="" produce="" it="" at="" the="" theatre="" to="" get="" \nyour="" tickets!\nhope="" you="" enjoy="" your="" movie!"; } getch(); cleardevice(); } void="" save(char="" _lines[120][20],char="" _final[20]) { ifstream="" fin(_final); for(int="" i="0;i<120;i++) { fin">>_lines[i]; } ofstream close(); } void showseats() { int i,j; clrscr(); int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\TURBOC3\\BGI"); int maxx,maxy; maxx=getmaxx(); maxy=getmaxy(); rectangle(0,0,maxx,maxy-110); rectangle(3,3,maxx-3,maxy-113); outtextxy(286,20,"SCREEN"); outtextxy(66,52,"1"); outtextxy(98,52,"2"); outtextxy(130,52,"3"); outtextxy(162,52,"4"); outtextxy(194,52,"5"); outtextxy(258,52,"6"); outtextxy(290,52,"7"); outtextxy(322,52,"8"); outtextxy(354,52,"9"); outtextxy(386,52,"10"); outtextxy(450,52,"11"); outtextxy(482,52,"12"); outtextxy(514,52,"13"); outtextxy(546,52,"14"); outtextxy(578,52,"15"); outtextxy(36,84,"A"); outtextxy(36,116,"B"); outtextxy(36,148,"C"); outtextxy(36,180,"D"); outtextxy(36,212,"E"); outtextxy(36,244,"F"); outtextxy(36,276,"G"); for(i-0;i<17;i++) { for(j=0;j<7;j++) { if((i==5)||(i==11)) i++; rectangle(66+(32*i),82+(32*j),76+(32*i),92+(32*j)); if(s[i][j].flag==1) { setfillstyle(SOLID_FILL,RED); floodfill(71+(32*i),87+(32*j),WHITE); } else if(s[i][j].flag==0) { setfillstyle(SOLID_FILL,GREEN); floodfill(71+(32*i),87+(32*j),WHITE); } } } rectangle(45,318,55,328); setfillstyle(SOLID_FILL,RED); floodfill(50,323,WHITE); outtextxy(70,319,"ALREADY BOOKED"); rectangle(45,338,55,348); setfillstyle(SOLID_FILL,GREEN); floodfill(50,343,WHITE); outtextxy(70,339,"AVAILABLE"); } void main() { char final[20]; int i; char lines[120][20]; firstpage(); accounts(); i=createfilename(final); if(i==0) iffirst(final); save(lines,final); savetostructure(lines); showseats(); booking(lines,final); }
Что я уже пробовал:
я много чего перепробовал. я проверил все скобки и точки с запятой.
Richard MacCutchan
И вы хотите, чтобы мы угадали, какая линия 120?