473,396 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Error: statement missing at line

have an error in this coding.
the error is statement missing at line (78,11)
thank you.

Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. #include <conio>
  3. const int listSize=2;
  4. struct menuItemType
  5. {
  6.     char menuItem [50];
  7.    double menuPrice,Totaltax,price,tax,totalPrice;
  8. };
  9.  
  10. void showMenu (menuItemType menuList[], int listSize);
  11. void showMenu (menuItemType menuList[], int listSize)
  12. {
  13.     cout<<"1    :PLAIN EGG       :    $1.45"<<endl;
  14.    cout<<"2    :BACON AND EGG   :    $2.45"<<endl;
  15.    cout<<"3    :MUFFIN          :    $0.99"<<endl;
  16.    cout<<"4    :FRENCH TOAST    :    $1.99"<<endl;
  17.    cout<<"5    :FRUIT BASKET    :    $2.49"<<endl;
  18.    cout<<"6    :CEREAL          :    $0.69"<<endl;
  19.    cout<<"7    :COFFEE          :    $0.50"<<endl;
  20.    cout<<"8    :TEA             :    $0.75"<<endl;
  21.  
  22. }
  23.  
  24. void getData (menuItemType menuList[],char menuItem, int listSize);
  25. void getData (menuItemType menuList[],char menuItem, int listSize)
  26. {
  27.  float price;
  28.  if (menuItem==1)
  29.     price= 1.45;
  30.  else if (menuItem==2)
  31.      price= 2.45;
  32.  else if (menuItem==3)
  33.      price=0.99;
  34.  else if (menuItem==4)
  35.      price=1.99;
  36.  else if (menuItem==5)
  37.      price=2.49;
  38.  else if (menuItem==6)
  39.      price=0.69;
  40.  else if (menuItem==7)
  41.      price=0.50;
  42.  else if (menuItem==8)
  43.      price=0.75;
  44.  
  45.  
  46.  int c=1;
  47.  while (menuItem!= 9)
  48.   {
  49.           cout<<"ENTER THE MENU   :";
  50.       cin.getline(menuList[listSize].menuItem,50);
  51.       c++;
  52.   }
  53.  
  54. }
  55.  
  56. void printCheck (menuItemType menuList[],menuItemType menuPrice, int listSize);
  57. void printCheck (menuItemType menuList[],menuItemType menuPrice, int listSize)
  58. {
  59.     cout<<"WELCOME TO JOHNNY'S RESTAURANT"<<endl;
  60.    cout<<endl;
  61.    cout<<"YOUR ORDER  :"<< menuList[listSize].menuItem<<endl;
  62.  
  63.    float totalPrice;
  64.    float tax=0.05;
  65.    float Totaltax;
  66.    menuPrice.Totaltax=menuPrice.price*menuPrice.tax;
  67.    menuPrice.totalPrice=(menuPrice.totalPrice+menuPrice.price)*menuPrice.Totaltax;
  68.  
  69.    cout<<"TAX              :"<<menuPrice.Totaltax<<endl;
  70.    cout<<"TOTAL PRICE    :"<<menuPrice.totalPrice<<endl;
  71. }
  72.  
  73. void main()
  74. {
  75.    menuItemType menuList[listSize];
  76.  
  77.    showMenu (menuList,listSize)
  78.    getData (menuList,listSize,menuItem)
  79.    printCheck (menuList,listSize,menuPrice)
  80.  
  81.    getch();
  82. }
Mar 22 '10 #1
1 7526
Banfa
9,065 Expert Mod 8TB
Look at lines 77 , 78 and 79 they are all missing the ; at the end of them just like the error says.

main does not return void, it always returns int anthing else is undefined behaviour.

For all your functions putting the declaration on the line before the definition is pointless. You may as well remove all those declarations.
Mar 22 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Robert Mark Bram | last post by:
Hi All! I have the following two methods in an asp/jscript page - my problem is that without the update statement there is no error, but with the update statement I get the following error: ...
29
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
1
by: geek04 | last post by:
i'm using pro*c to precompile my c++ code which accesses oracle 9i database, i'm running a oracle 9i client on my system on compiling the c++ file (generated by pro*c)i'm getting following...
1
by: Jack | last post by:
Hi, I got a asp page where I am getting the following error. (Line 126 is actually the RS.open statement.) ERROR MESSAGE Technical Information (for support personnel) Error Type:
4
by: dcarson | last post by:
I've read about this error in several other discussions, but still can't seem to pinpoint the problem with my code. Everything seemed to be working fine for some time, but it now tends to bomb out...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
2
by: Charles Wilt | last post by:
I have a IBM iSeries (aka AS-400) running v5r3 of OS/400 that I access via a linked server from SQL Server 2000. The following select works fine: select * from...
18
by: Bill | last post by:
I'm getting a syntax error on line 18 of this code and I don't see a missing ";". Does anyone else see it? #include < stdio.h> void main() { FILE *fp; int i; int CharString;
8
sammyboy78
by: sammyboy78 | last post by:
I'm trying to create a class "WeeklyPay" that contains the methods that class "WeeklyPayTest" will use to compute the weekly pay of an employee when the user inputs employee name, hours worked, and...
3
by: pedalpete | last post by:
I'm getting a "missing ; before statement" error in javacript I'm surprised i wasn't able to find anything about this on this site. I am not sure why I'm getting this error, everything looks...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.