|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (4 bit)
Join Date: Jan 2004
Location: Barrie
Posts: 8
|
C++. Unepected End of File Found
WHAT DOES THIS MEAN, CAN SOMEONE PLEASE HELP!
|
|
|
|
|
|
#2 |
|
Registered User
Join Date: Nov 2001
Posts: 1,965
|
most probably you missed a closing brace, or added an extra one.
If you still can't find what's wrong, post your code and we'll try to help. And please don't type all caps again. good luck. |
|
|
|
|
|
#3 |
|
Member (4 bit)
Join Date: Jan 2004
Location: Barrie
Posts: 8
|
# include
void main (void) { int purchase1=0,purchase2=0, purchase3=0, purchase4=0, purchase5=0, purchase6=0, purchase7=0, purchase8=0,purchase9=0,purchase10=0; char start[100]; int total=0; int add_array; int array[200]; int size; int i; { int i; int total = 0; for(i = 0; i < size; i++) total += array[i]; printf(" Welcome To Zero Donkey Your #1 Snow Boarding Store\n"); printf(" After You Have Selected Your Items, Type End For Your Final Price\n"); printf(" Please Type Start To Begin\n"); scanf("%s",&start); printf("\n"); printf("Item #1-Zero Donkey Goggles $10.00\n"); printf("Purchase Item? 1. Yes Or 2 .No? 1 or 2\n"); scanf("%i",&purchase1); if (purchase1==1){ total+=10; } printf("\n"); printf("Item #2- Zero Donkey Outerwear Jacket $100.00\n"); printf("Purchase Item? Yes Or No?\n"); scanf("%i",&purchase2); if (purchase2==1){ total+=100; } printf("\n"); printf("Item #3- Zero Donkey Series 200 Snowboard $285.00\n"); printf("Purchase Item? Yes Or No?\n"); scanf("%i",&purchase3); if (purchase3==1){ total+=285; } printf("\n"); printf("Item #4- Dream Leap Bindings $30.00\n"); printf("Purchase Item? Yes Or No?\n"); scanf("%i",&purchase4); if (purchase4==1){ total+=30; } printf("\n"); printf("Item #5- Zero Donkey Boots $35.00\n"); printf("Purchase Item? Yes Or No?\n"); scanf("%i",&purchase5); if (purchase5==1){ total+=35; } printf("\n"); printf("Item #6- Dream Leap Helmet $20.00\n"); printf("Purchase Item? Yes Or No?\n"); scanf("%i",&purchase6); if (purchase6==1){ total+=20; } printf("\n"); printf("Item #7- Zero Donkey Ski-Pass (Zero Dream Snow Resort) $80.00\n"); printf("Purchase Item? Yes Or No?\n"); scanf("%i",&purchase7); if (purchase7==1){ total+=80; } printf("\n"); printf("Item #8- Dream Leap Sunglasses $8.00\n"); printf("Purchase Item? Yes Or No?\n"); scanf("%i",&purchase8); if (purchase8==1){ total+=8; } printf("\n"); printf("Item #9- Zero Donkey Snowboard Video $ 15.00\n"); printf("Purchase Item? Yes Or No?\n"); scanf("%i",&purchase9); if (purchase9==1){ total+=15; } printf("\n"); printf("Item #10- Zero Donkey Key Chain $4.00\n"); printf("Purchase Item? Yes Or No?\n"); scanf("%i",&purchase10); if (purchase10==1){ total+=4; } printf("\n"); { return;(total); printf("Your total today is: $%i \n",total ); scanf("%i",total); } still one error -unexpected end of file found. i dont even think that hte stuipd array i tried to put in worked. |
|
|
|
|
|
#4 |
|
Member (9 bit)
Join Date: May 1999
Location: kitchener, Ontario
Posts: 364
|
there are many uneccessary brackets
it would also help make your code more readable to write one command per line and indent relevant blocks of code. ![]() oh.. and theres nothing after the include statement. there should probably be an 'stdio.h' there or none of the print and scan finctions will work |
|
|
|
|
|
#5 |
|
Member (7 bit)
Join Date: Nov 2001
Location: Rochester, NY
Posts: 87
|
Looking at the code, it looks like you are missing two "}" at the end.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|