have an error in this coding.
the error is statement missing at line (78,11)
thank you. - #include <iostream>
-
#include <conio>
-
const int listSize=2;
-
struct menuItemType
-
{
-
char menuItem [50];
-
double menuPrice,Totaltax,price,tax,totalPrice;
-
};
-
-
void showMenu (menuItemType menuList[], int listSize);
-
void showMenu (menuItemType menuList[], int listSize)
-
{
-
cout<<"1 :PLAIN EGG : $1.45"<<endl;
-
cout<<"2 :BACON AND EGG : $2.45"<<endl;
-
cout<<"3 :MUFFIN : $0.99"<<endl;
-
cout<<"4 :FRENCH TOAST : $1.99"<<endl;
-
cout<<"5 :FRUIT BASKET : $2.49"<<endl;
-
cout<<"6 :CEREAL : $0.69"<<endl;
-
cout<<"7 :COFFEE : $0.50"<<endl;
-
cout<<"8 :TEA : $0.75"<<endl;
-
-
}
-
-
void getData (menuItemType menuList[],char menuItem, int listSize);
-
void getData (menuItemType menuList[],char menuItem, int listSize)
-
{
-
float price;
-
if (menuItem==1)
-
price= 1.45;
-
else if (menuItem==2)
-
price= 2.45;
-
else if (menuItem==3)
-
price=0.99;
-
else if (menuItem==4)
-
price=1.99;
-
else if (menuItem==5)
-
price=2.49;
-
else if (menuItem==6)
-
price=0.69;
-
else if (menuItem==7)
-
price=0.50;
-
else if (menuItem==8)
-
price=0.75;
-
-
-
int c=1;
-
while (menuItem!= 9)
-
{
-
cout<<"ENTER THE MENU :";
-
cin.getline(menuList[listSize].menuItem,50);
-
c++;
-
}
-
-
}
-
-
void printCheck (menuItemType menuList[],menuItemType menuPrice, int listSize);
-
void printCheck (menuItemType menuList[],menuItemType menuPrice, int listSize)
-
{
-
cout<<"WELCOME TO JOHNNY'S RESTAURANT"<<endl;
-
cout<<endl;
-
cout<<"YOUR ORDER :"<< menuList[listSize].menuItem<<endl;
-
-
float totalPrice;
-
float tax=0.05;
-
float Totaltax;
-
menuPrice.Totaltax=menuPrice.price*menuPrice.tax;
-
menuPrice.totalPrice=(menuPrice.totalPrice+menuPrice.price)*menuPrice.Totaltax;
-
-
cout<<"TAX :"<<menuPrice.Totaltax<<endl;
-
cout<<"TOTAL PRICE :"<<menuPrice.totalPrice<<endl;
-
}
-
-
void main()
-
{
-
menuItemType menuList[listSize];
-
-
showMenu (menuList,listSize)
-
getData (menuList,listSize,menuItem)
-
printCheck (menuList,listSize,menuPrice)
-
-
getch();
-
}
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.
Sign in to post your reply or Sign up for a free account.
Similar topics
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:
...
|
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"...
|
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...
|
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:
|
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...
|
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...
|
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...
|
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;
|
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...
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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,...
|
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...
| |