Question: I am trying to solve this problem that has been answered. I followed the instructions and I am unable to compile. My code: #include #include

I am trying to solve this problem that has been answered. I followed the instructions and I am unable to compile. My code:
#include
#include
#include
using namespace std;
struct menuItemType;
{
double menuitem[10];
double menuprice[10];
}
void getData(menuItemType &m,int &c);
void showMenu();
void printcheck (menuItemType &m, int c);
void main()
{
menuItemType menulist;
int c;
showMenu();
getData(menulist,c);
printcheck(menulist,c);
system("pause");
}
void showMenu()
{
cout
cout
cout
cout
cout
cout
cout
cout
cout
}
void getData(menuItemType &m,int &c)
{
int k;
int choice;
cout
cin>>c;
cout
for (k=0;k { cin>>choice; switch(choice) { case 1:m.menuitem[k]="Plain Egg"; m.menuprice[k]= 1.45; break; case 2:m.menuitem[k]="Bacon & Egg"; m.menuprice[k]= 2.45; break; case 3:m.menuitem[k]="Muffin"; m.menuprice[k]= 0.99; break; case 4:m.menuitem[k]="French Toast"; m.menuprice[k]= 1.99; break; case 5:m.menuitem[k]="Fruit Basket"; m.menuprice[k]= 2.49; break; case 6:m.menuitem[k]="Cereal"; m.menuprice[k]= 0.69; break; case 7:m.menuitem[k]="Coffee"; m.menuprice[k]= 0.50; break; case 8:m.menuitem[k]="Tea"; m.menuprice[k]= 0.75; break; } } } void printcheck(menuItemType &m,int c); { int j; float price=0.0, tax=0.0,total; cout for(j=0;j { cout price=price+m.menuprice[j]; } tax=0.05*price; total=tax+price; std::cout std::cout cout cout } Please provide a working code as well as explanation as to the errors.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
