Friday 15 July 2011

wait - if else statements is it wrong or is my compiler that's wrong? -



wait - if else statements is it wrong or is my compiler that's wrong? -

ok here's mystery no 1 inquire can solve. maybe beginner know shouldn't get.

1>c:\users\kevin\documents\visual studio 2010\projects\movie\movie\p2 project.cpp(57): error c2143: syntax error : missing ';' before '{' 1>c:\users\kevin\documents\visual studio 2010\projects\movie\movie\p2 project.cpp(68): error c2181: illegal else without matching if

for section here

int customer_menu(char signup(struct register_ regis)) { file *cni; /* cni means client necessary info*/ cni=fopen("login.txt","a+"); if(cni!=null) { if (regis.category=="customer" ) /*this compiler error at. expecting ';' here?:*/ { printf("\t\t~>~>~>~>~>~>~>menu~>~>~>~>~>~>~>~>~~ \n"); printf("\t\t~>~>~>~>~>~>~>~>~>~>~>~>~>>~>~>~>~>~ \n"); printf("\t\t~>~>~>~>>~>~>~>~>~>~>~>~>~>~>~>~>~>~ \n"); printf("\t\t~>~>~>~>~>to login~>~>~>~>~>~press 1 \n"); printf("\t\t~>~>~>~>~>to register~>~>~>~>press 2 \n"); printf("\t\t~>~>~>~>~>to purchase ticket~>~>~>press 6 \n"); printf("\t\t~>~>~>~>~>to exit~>~>~>~>~>~>press 0 \n"); printf("\t\t~>~>~>~>~>~>~>~>~>~>~>~>~>>~>~>~>~>~ \n"); printf("\t\t~>~>~>~>>~>~>~>~>~>~>~>~>~>~>~>~>~>~ \n"); scanf("%d",&choice); } else { int worker_menu(char signup(struct regis)); } fclose(cni); /* , illegal utilize of else without matching if here?*/ } else { printf("an error occured. please seek again\n"); system("pause"); system("cls"); char log,reg; desion(reg, log); } }

do have errors before error comment compiler skip result in such shocking , puzzling mystery?

int customer_menu(char signup(struct register_ regis)) {

this not valid function declaration. it's not obvious how prepare it, either. want mean?

if-statement wait

No comments:

Post a Comment