#include <stdio.h>
#include <string.h>
#include <conio.h>
#define MAX 17
#define TAX_RATE 0.12
#define LENGTH 30

struct menuItemType
 {
	char menuItem[LENGTH];
	float menuPrice;
	int numOrdered;
}theMenu[MAX];

void Menu(void);
int getData(int);
void overView(void);
void initialize(void);
int order(void);
float pbill=0;
float bill=0;
float totalTax=0;

int main(void)
{
	int choice=0;
	char end;


	initialize();
	do
	{
	Menu();

	choice = getData(int);

	bill += theMenu[choice].menuPrice;

	theMenu[choice].numOrdered = order();

	printf("%d \t\t\t %s",theMenu[choice].numOrdered ,theMenu[choice].menuItem[LENGTH]);
	
	totalTax = bill * TAX_RATE;

	pbill = bill - totalTax;

	do{
	printf("Would you like to place another order?  (Y/N)");
	scanf("%c",&end);
	}while (end != 'Y' || end != 'y' || end != 'N' || end != 'n');

	}while (end == 'Y' || end == 'y');

	overView();

	printf("\n\n\t\tVATABLE Sales :     %f\n",pbill);
	printf("\t\t   VAT Amount :     %f\n\n",totalTax);
	printf("\t\t Amount Due :     %f",bill);

}




 /*  shows the Menu */


void Menu(void)
{
clrscr();
	int y;

	for(y=0;y<=MAX;y++)
			{
	strcpy(theMenu[y].menuItem[LENGTH],{	" [1]  Chicken A",
					" [2]  Chicken B",
					" [3]  Chicken C",
					" [4]  Chicken D",
					" [5]  Chicken E",
					" [6]  Chicken F",
					" [7]  Pork A",
					" [9]  Pork C",
					"[10]  Pork D",
					"[11]  Pork E",
					"[12]  Pork F",
					"[13]  Beef A",
					"[14]  Beef B",
					"[15]  Beef C",
					"[16]  Beef D",
					"[17]  Beef E",
					"[18]  Beef F"});
			}
	for(y=0;y<=MAX;y++)
			{
	theMenu[y].menuPrice  = {70.00,
				71.00,
				72.00,
				74.00,
				75.00,
				70.00,
				80.00,
				80.00,
				82.00,
				90.00,
				91.00,
				93.00,
				97.00,
				96.00,
				99.00,
				100.00,
				120.00,
				110.00};
			}
	for(y=0;y<=MAX;y++)
	{
	printf("\t%s \t\t%f",theMenu[y].menuItem[LENGTH], theMenu[y].menuPrice);
	printf("\n");
	}

}

 /*    Initialize   */


void initialize(void){

	int x=0;       
         
	for (x = 0; x <= MAX; x++)   
	{
		theMenu[x].numOrdered = 0;
	}
	
}



 /*    getData    */

int getData(int z)
{
	z=0;

	printf("\nPlease choose a food item by the corresponding number.");
	scanf("%d",&z); 
        z -= 1; 			

	return z;	
}


  
 /*   overView   */


void overView(void)
{
clrscr();
	int y=0;

	printf("\t\tWelcome to Porky's Meat Shop");
	for (y = 0; y <= MAX; y++)
	{
	if (theMenu[y].numOrdered > 0)
		{
	printf("\n\n %d \t %s \t %f\n",theMenu[y].numOrdered, theMenu[y].menuItem[LENGTH], theMenu[y].menuPrice); 
	printf("\n");
		}
	}

} 



 /*  ORDER  */


int order(void)
{
int g;

printf("\n\n\n\t\t\tHow many orders? ");
scanf("%d",&g);

return g;

}

Error: Expression syntax in function main on the last 2 errors and "too few parameters in call to "getData" in function main".

choice = getData(int);
strcpy(theMenu[y].menuItem[LENGTH],{ " [1] Chicken A",
theMenu[y].menuPrice = {70.00,

pls tell me where did i go wrong? this is not yet a finished project.. i'm trying to run this first before putting the main menu...

you can tell that the variables on the structure are familiar. i just copied someone's code.. only in the structure..

#include <stdio.h>
#include <string.h>
#include <conio.h>
#define MAX 17
#define TAX_RATE 0.12
#define LENGTH 30

struct menuItemType
 {
	char menuItem[LENGTH];
	float menuPrice;
	int numOrdered;
}theMenu[MAX];

void Menu(void);
int getData(int);
void overView(void);
void initialize(void);
int order(void);
float pbill=0;
float bill=0;
float totalTax=0;
void resibo(void);
int y;

int main()
{
	int choice=0;
	char end;


	initialize();
	do
	{
	Menu();

	choice = getData(int);

	bill += theMenu[choice].menuPrice;

	theMenu[choice].numOrdered = order();

	printf("%d \t\t\t %s",theMenu[choice].numOrdered ,theMenu[choice].menuItem[LENGTH]);
	
	totalTax = bill * TAX_RATE;

	pbill = bill - totalTax;

	do{
	printf("Would you like to place another order?  (Y/N)");
	scanf("%c",&end);
	}while (end != 'Y' || end != 'y' || end != 'N' || end != 'n');

	}while (end == 'Y' || end == 'y');

	overView();

	resibo();

}




 /*  shows the Menu */


void Menu(void)
{
clrscr();

	for(y=0;y<=MAX;y++)
			{
	strcpy(theMenu[y].menuItem[LENGTH],{	" [1]  Chicken A",
					" [2]  Chicken B",
					" [3]  Chicken C",
					" [4]  Chicken D",
					" [5]  Chicken E",
					" [6]  Chicken F",
					" [7]  Pork A",
					" [9]  Pork C",
					"[10]  Pork D",
					"[11]  Pork E",
					"[12]  Pork F",
					"[13]  Beef A",
					"[14]  Beef B",
					"[15]  Beef C",
					"[16]  Beef D",
					"[17]  Beef E",
					"[18]  Beef F"});
			}
	for(y=0;y<=MAX;y++)
			{
	theMenu[y].menuPrice  = {70.00,
				71.00,
				72.00,
				74.00,
				75.00,
				70.00,
				80.00,
				80.00,
				82.00,
				90.00,
				91.00,
				93.00,
				97.00,
				96.00,
				99.00,
				100.00,
				120.00,
				110.00};
			}
	for(y=0;y<=MAX;y++)
	{
	printf("\t%s \t\t%f",theMenu[y].menuItem[LENGTH], theMenu[y].menuPrice);
	printf("\n");
	}

}

 /*    Initialize   */


void initialize(void){

	y=0;       
         
	for (y = 0; y <= MAX; y++)   
	{
		theMenu[y].numOrdered = 0;
	}
	
}



 /*    getData    */

int getData(int z)
{
	z=0;

	printf("\nPlease choose a food item by the corresponding number.");
	scanf("%d",&z); 
        z -= 1; 			

	return z;	
}


  
 /*   overView   */


void overView(void)
{
clrscr();

	printf("\t\tWelcome to Porky's Meat Shop");
	for (y = 0; y <= MAX; y++)
	{
	if (theMenu[y].numOrdered > 0)
		{
	printf("\n\n %d \t %s \t %f\n",theMenu[y].numOrdered, theMenu[y].menuItem[LENGTH], theMenu[y].menuPrice); 
	printf("\n");
		}
	}

} 



 /*  ORDER  */


int order(void)
{
int g;

printf("\n\n\n\t\t\tHow many orders? ");
scanf("%d",&g);

return g;

}


/* RESIBO */

void resibo(void){

clrscr();

gotoxy(31,2);printf("PORKY'S MEAT SHOP");
gotoxy(30,3);printf("Agora Road, Disneyland");
gotoxy(30,5);printf("------------------------------");

gotoxy(30,5);printf("\n\n\t\tVATABLE Sales :     %f\n",pbill);
gotoxy(30,5);printf("\t\t   VAT Amount :     %f\n\n",totalTax);
gotoxy(30,5);printf("\t\t Amount Due :     %f",bill);

}

sorry, this is the updated one

>choice = getData(int);
You're getting the error because getData needs an actual integer to be passed to it. Then again, making getData() take parameters which it doesn't actually use makes no sense, so you should change the prototype of the function to getData(void).

Your menu() function also makes no sense. You can't copy large arrays into single variables, as you're trying to do with strcpy() and the assignment operator.

>choice = getData(int);
You're getting the error because getData needs an actual integer to be passed to it. Then again, making getData() take parameters which it doesn't actually use makes no sense, so you should change the prototype of the function to getData(void).

Your menu() function also makes no sense. You can't copy large arrays into single variables, as you're trying to do with strcpy() and the assignment operator.

hmm.. do you mean that i have to declare it 1x1?

Make these changes in getData function:

int getData(int);

change this to

int getData();

-------------------------------------------------

choice = getData(int);

change this to

choice = getData();

-------------------------------------------------

int getData(int z)
{
	z=0;

change this to

int getData()
{
	int z=0;

----------------------------------------------------------------------------
----------------------------------------------------------------------------
You cannot do this in menu function:

strcpy(theMenu[y].menuItem[LENGTH],{	" [1]  Chicken A",
					" [2]  Chicken B",
					" [3]  Chicken C",
					" [4]  Chicken D",
					" [5]  Chicken E",

You need to do it separate initialization only for both the arrays as:

theMenu[0].menuItem[LENGTH]=" [1]  Chicken A";
theMenu[1].menuItem[LENGTH]=" [2]  Chicken B";
theMenu[2].menuItem[LENGTH]=" [3]  Chicken C";
theMenu[3].menuItem[LENGTH]=" [4]  Chicken D";
theMenu[4].menuItem[LENGTH]=" [5]  Chicken E";
//continues

>theMenu[0].menuItem[LENGTH]=" [1] Chicken A";
That won't work either. You'll have to strcpy the strings into the character arrays, or point each node of menuItem to a string literal and then make menuItem a const char pointer (to make sure that you don't accidentally try to modify the string literal).

>theMenu[0].menuItem[LENGTH]=" [1] Chicken A";
That won't work either. You'll have to strcpy the strings into the character arrays, or point each node of menuItem to a string literal and then make menuItem a const char pointer (to make sure that you don't accidentally try to modify the string literal).

Ya a mistake on my part sorry I got it confused with

char arr[30]="Hello I am .....";

But that cannot be done on the later part I mean after initialization so best method is as you suggested "strcpy". This is the reason I love this forum.I get a chance to learn a new thing and also learn from my mistakes every now and then.Every one please note "A small mistake on one topic done by you will make this forum teach you two topics.Thanks Daniweb!!!"

Thanks for helping me guyz, my second problem is about the character "end".

i used toupper but it's not working..

do{
	printf("Would you like to place another order?  (Y/N)");
	scanf("%c",&end);

	end = toupper(end);

	}while (end != 'Y' || end != 'N');

T_T

Thanks for helping me guyz, my second problem is about the character "end".

i used toupper but it's not working..

do{
	printf("Would you like to place another order?  (Y/N)");
	scanf("%c",&end);

	end = toupper(end);

	}while (end != 'Y' || end != 'N');

T_T

while (end != 'Y' || end != 'N');

This statement is a complete nonsense...If end is equal to Y you need to loop again right? This thing doesn't do anything...
Atleast do this :

while (end == 'Y' || end != 'N');

or even this:

while (end == 'Y' );

And it involves the header file "ctype.h"

i used ctype.h to to use the toupper function..

well, i guess ur right..

while (end != 'Y' || end != 'N');

is a complete nonsense.. my mind might have been very tired last night..

I changed it already to

while (end != 'Y' && end != 'N');

my question now is.. is my way of using toupper correct?

#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <ctype.h>
#define TAX_RATE 0.12
#define MAX 17
#define LENGTH 30

struct menuItemType
 {
	char menuItem[LENGTH];
	float menuPrice;
	float numOrdered;
}theMenu[MAX];

int getData(void);
void overView(void);
int chicken(void);
int beef(void);
int pork(void);
int menu(void);
void initialize(void);
float order(void);
float pbill=0;
float bill=0;
float totalTax=0;
void resibo(void);
int y;
int choice;

int main(void)
{
	choice=0;
	int choyz=0;
	char end;

	initialize();
	do
	{
	choyz = menu();

	if(choyz==1) choice = chicken();
	else if(choyz==2) choice = pork();
	else if(choyz==3) choice = beef();
	else if(choyz==4) printf("Salamat Lamang!"); getch();

	theMenu[choice].numOrdered = order();

	bill += (theMenu[choice].menuPrice * theMenu[choice].numOrdered);
	totalTax = bill * TAX_RATE;
	pbill = bill - totalTax;

	do{
	printf("Would you like to place another order?  (Y/N)");
	scanf("%c",&end);

	end = toupper(end);

	}while (end != 'Y' && end != 'N');

	}while (end == 'Y');

	overView();
	resibo();
}


 /*    Initialize   */


void initialize(void){

	for (y = 0; y <= MAX; y++)
	{
		theMenu[y].numOrdered = 0;
	}

}



 /*   overView   */


void overView(void)
{
clrscr();

	printf("\t\tWelcome to Porky's Meat Shop");
	for (y = 0; y <= MAX; y++)
	{
	if (theMenu[y].numOrdered > 0)
		{
	printf("\n\n %.2f \t %s \t %.2f\n",theMenu[y].numOrdered, theMenu[y].menuItem, theMenu[y].menuPrice);
	printf("\n");
		}
	}

}



 /*  ORDER  */


float order(void)
{
float g;

printf("\n\n\t\t\tHow many kilos? ");
scanf("%f",&g);

return g;

}


/* RESIBO */

void resibo(void){

clrscr();

gotoxy(31,2);printf("PORKY'S MEAT SHOP");
gotoxy(30,3);printf("Agora Road, Disneyland");
gotoxy(30,5);printf("------------------------------");

gotoxy(30,7);printf("\n\n\t\tVATABLE Sales :     %.2f",pbill);
gotoxy(30,8);printf("\t\t   VAT Amount :     %.2f",totalTax);
gotoxy(30,10);printf("\t\t Amount Due :     %.2f",bill);

}


/* MAIN MENU */

int menu(void){
clrscr();
choice=0;

do{
gotoxy(30,6);printf("[1] Chicken");
gotoxy(30,7);printf("[2] Pork");
gotoxy(30,8);printf("[3] Beef");
gotoxy(30,9);printf("[4] Exit");
gotoxy(30,11);textcolor(BLACK);textbackground(WHITE);cprintf("Enter Choice: ");
scanf("%d",&choice);
}while(choice<1 || choice>4);
return choice;
}



/* CHICKEN */

int chicken(void){
clrscr();
choice=0;

	strcpy(theMenu[0].menuItem," [1]  Chicken A");
	strcpy(theMenu[1].menuItem," [2]  Chicken B");
	strcpy(theMenu[2].menuItem," [3]  Chicken C");
	strcpy(theMenu[3].menuItem," [4]  Chicken D");
	strcpy(theMenu[4].menuItem," [5]  Chicken E");
	strcpy(theMenu[5].menuItem," [6]  Chicken F");

	theMenu[0].menuPrice = 70.00;
	theMenu[1].menuPrice = 71.00;
	theMenu[2].menuPrice = 72.00;
	theMenu[3].menuPrice = 74.00;
	theMenu[4].menuPrice = 75.00;
	theMenu[5].menuPrice = 70.00;

	for(y=0;y<=5;y++)
	{
	gotoxy(25,6);printf("%s \t\t %.2f\n",theMenu[y].menuItem,theMenu[y].menuPrice);
	}
	gotoxy(30,14);textcolor(BLACK);textbackground(WHITE);cprintf("Enter Choice: ");
	scanf("%d",&choice);

	return choice-1;
}


/* PORK */

int pork(void){
clrscr();
choice=0;

	strcpy(theMenu[6].menuItem," [1]  Pork A");
	strcpy(theMenu[7].menuItem," [2]  Pork B");
	strcpy(theMenu[8].menuItem," [3]  Pork C");
	strcpy(theMenu[9].menuItem," [4]  Pork D");
	strcpy(theMenu[10].menuItem,"[5]  Pork E");
	strcpy(theMenu[11].menuItem,"[6]  Pork F");

	theMenu[6].menuPrice = 80.00;
	theMenu[7].menuPrice = 80.00;
	theMenu[8].menuPrice = 82.00;
	theMenu[9].menuPrice = 90.00;
	theMenu[10].menuPrice = 91.00;
	theMenu[11].menuPrice = 93.00;

	for(y=6;y<=11;y++)
	{
	gotoxy(25,6);printf("%s \t\t %.2f\n",theMenu[y].menuItem,theMenu[y].menuPrice);
	}
	gotoxy(30,14);textcolor(BLACK);textbackground(WHITE);cprintf("Enter Choice: ");
	scanf("%d",&choice);

	return choice+5;
}


/* BEEF */

int beef(void){
clrscr();
choice=0;

	strcpy(theMenu[12].menuItem,"[1]  Beef A");
	strcpy(theMenu[13].menuItem,"[2]  Beef B");
	strcpy(theMenu[14].menuItem,"[3]  Beef C");
	strcpy(theMenu[15].menuItem,"[4]  Beef D");
	strcpy(theMenu[16].menuItem,"[5]  Beef E");
	strcpy(theMenu[17].menuItem,"[6]  Beef F");

	theMenu[12].menuPrice = 97.00;
	theMenu[13].menuPrice = 96.00;
	theMenu[14].menuPrice = 99.00;
	theMenu[15].menuPrice = 100.00;
	theMenu[16].menuPrice = 120.00;
	theMenu[17].menuPrice = 110.00;

	for(y=12;y<=MAX;y++)
	{
	gotoxy(25,6);printf("%s \t\t %.2f\n",theMenu[y].menuItem,theMenu[y].menuPrice);
	}
	gotoxy(30,14);textcolor(BLACK);textbackground(WHITE);cprintf("Enter Choice: ");
	scanf("%d",&choice);

	return choice+11;

}

it says expression syntax on

int choyz=0;
	char end;

I really think you need to relax your brain because you are going wrong again in this :

do{
printf("Would you like to place another order? (Y/N)");
scanf("%c",&end);
end = toupper(end);
}while (end != 'Y' && end != 'N');

Here the do while loop only works if you press in some garbage value or character apart from "y" and "n".That is not what you want.Just change it to

while(end!='N')

I don't see any problem with the toupper call. Just the above change is enough and I haven't gone through other parts of your program.

I really think you need to relax your brain because you are going wrong again in this :

do{
printf("Would you like to place another order? (Y/N)");
scanf("%c",&end);
end = toupper(end);
}while (end != 'Y' && end != 'N');

Here the do while loop only works if you press in some garbage value or character apart from "y" and "n".That is not what you want.Just change it to

while(end!='N')

No, you're wrong, the OP is correct. The goal of the loop is to keep asking the user until valid input is entered (Y or N). The initial mistake was made by using OR instead of AND, because you want to keep looping while the input isn't Y AND the input isn't N. But the code is correct now.

As for the code that has been posted, the only thing I notice is that at the beginning of main() your variable declarations aren't all before execution begins. If you're compiling under C89, variable declarations always have to be at the beginning of an execution block.

As for the code that has been posted, the only thing I notice is that at the beginning of main() your variable declarations aren't all before execution begins. If you're compiling under C89, variable declarations always have to be at the beginning of an execution block.

what do you mean? i declared it before execution.. My problem is this 2 declarations again..

int choyz=0;
char end;

Before your declarations you assigned 'choice' to 0. That counts as execution.

Before your declarations you assigned 'choice' to 0. That counts as execution.

ah ok.. but this time, i don't know where i've done wrong, this is my updated code.

#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <ctype.h>
#define TAX_RATE 0.12
#define MAX 17
#define LENGTH 30

struct menuItemType
 {
	char menuItem[LENGTH];
	float menuPrice;
	float numOrdered;
}theMenu[MAX];

int getData(void);
char overView(void);
int chicken(void);
int beef(void);
int pork(void);
int menu(void);
void initialize(void);
float order(void);
float pbill=0;
float bill=0;
float totalTax=0;
void resibo(void);
int y;
int choice;

int main(void)
{
	int choyz;
	char end;
	char over;

	initialize();
	do
	{
	choyz = menu();

	if(choyz==1) choice = chicken();
	else if(choyz==2) choice = pork();
	else if(choyz==3) choice = beef();
	else if(choyz==4) printf("Salamat Lamang!"); getch();

	theMenu[choice].numOrdered = order();

	bill += (theMenu[choice].menuPrice * theMenu[choice].numOrdered);
	totalTax = bill * TAX_RATE;
	pbill = bill - totalTax;

	do{
	printf("Would you like to place another order?  (Y/N)");
	scanf("%c",&end);

	end = toupper(end);

	}while (end != 'Y' && end != 'N');

	}while (end == 'Y');

	over = overView();
	if(over==y) main();
	else resibo();
}


 /*    Initialize   */


void initialize(void){

	for (y = 0; y <= MAX; y++)
	{
		theMenu[y].numOrdered = 0;
	}

}



 /*   overView   */


char overView(void)
{
clrscr();
char again;

	printf("\t\tWelcome to Porky's Meat Shop");
	for (y = 0; y <= MAX; y++)
	{
	if (theMenu[y].numOrdered > 0)
		{
	printf("\n\n %.2f \t %s \t %.2f\n",theMenu[y].numOrdered, theMenu[y].menuItem, theMenu[y].menuPrice);
		}
	}
	do{
	printf("Are these information correct? (Y/N)");
	scanf("%c",&again);
	again = tolower(again);
	}while(again != y && again != n);

	return again;
}



 /*  ORDER  */


float order(void)
{
float g;

printf("\n\n\t\t\tHow many kilos? ");
scanf("%f",&g);

return g;

}


/* RESIBO */

void resibo(void){

clrscr();

gotoxy(31,2);printf("PORKY'S MEAT SHOP");
gotoxy(30,3);printf("Agora Road, Disneyland");
gotoxy(30,5);printf("------------------------------");

gotoxy(30,7);printf("\n\n\t\tVATABLE Sales :     %.2f",pbill);
gotoxy(30,8);printf("\t\t   VAT Amount :     %.2f",totalTax);
gotoxy(30,10);printf("\t\t Amount Due :     %.2f",bill);

}


/* MAIN MENU */

int menu(void){
clrscr();
choice=0;

do{
gotoxy(30,6);printf("[1] Chicken");
gotoxy(30,7);printf("[2] Pork");
gotoxy(30,8);printf("[3] Beef");
gotoxy(30,9);printf("[4] Exit");
gotoxy(30,11);textcolor(BLACK);textbackground(WHITE);cprintf("Enter Choice: ");
scanf("%d",&choice);
}while(choice<1 || choice>4);
return choice;
}



/* CHICKEN */

int chicken(void){
clrscr();
choice=0;

	strcpy(theMenu[0].menuItem," [1]  Chicken A");
	strcpy(theMenu[1].menuItem," [2]  Chicken B");
	strcpy(theMenu[2].menuItem," [3]  Chicken C");
	strcpy(theMenu[3].menuItem," [4]  Chicken D");
	strcpy(theMenu[4].menuItem," [5]  Chicken E");
	strcpy(theMenu[5].menuItem," [6]  Chicken F");

	theMenu[0].menuPrice = 70.00;
	theMenu[1].menuPrice = 71.00;
	theMenu[2].menuPrice = 72.00;
	theMenu[3].menuPrice = 74.00;
	theMenu[4].menuPrice = 75.00;
	theMenu[5].menuPrice = 70.00;

	for(y=0;y<=5;y++)
	{
	gotoxy(25,6);printf("%s \t\t %.2f\n",theMenu[y].menuItem,theMenu[y].menuPrice);
	}
	gotoxy(30,14);textcolor(BLACK);textbackground(WHITE);cprintf("Enter Choice: ");
	scanf("%d",&choice);

	return choice-1;
}


/* PORK */

int pork(void){
clrscr();
choice=0;

	strcpy(theMenu[6].menuItem," [1]  Pork A");
	strcpy(theMenu[7].menuItem," [2]  Pork B");
	strcpy(theMenu[8].menuItem," [3]  Pork C");
	strcpy(theMenu[9].menuItem," [4]  Pork D");
	strcpy(theMenu[10].menuItem,"[5]  Pork E");
	strcpy(theMenu[11].menuItem,"[6]  Pork F");

	theMenu[6].menuPrice = 80.00;
	theMenu[7].menuPrice = 80.00;
	theMenu[8].menuPrice = 82.00;
	theMenu[9].menuPrice = 90.00;
	theMenu[10].menuPrice = 91.00;
	theMenu[11].menuPrice = 93.00;

	for(y=6;y<=11;y++)
	{
	gotoxy(25,6);printf("%s \t\t %.2f\n",theMenu[y].menuItem,theMenu[y].menuPrice);
	}
	gotoxy(30,14);textcolor(BLACK);textbackground(WHITE);cprintf("Enter Choice: ");
	scanf("%d",&choice);

	return choice+5;
}


/* BEEF */

int beef(void){
clrscr();
choice=0;

	strcpy(theMenu[12].menuItem,"[1]  Beef A");
	strcpy(theMenu[13].menuItem,"[2]  Beef B");
	strcpy(theMenu[14].menuItem,"[3]  Beef C");
	strcpy(theMenu[15].menuItem,"[4]  Beef D");
	strcpy(theMenu[16].menuItem,"[5]  Beef E");
	strcpy(theMenu[17].menuItem,"[6]  Beef F");

	theMenu[12].menuPrice = 97.00;
	theMenu[13].menuPrice = 96.00;
	theMenu[14].menuPrice = 99.00;
	theMenu[15].menuPrice = 100.00;
	theMenu[16].menuPrice = 120.00;
	theMenu[17].menuPrice = 110.00;

	for(y=12;y<=MAX;y++)
	{
	gotoxy(25,6);printf("%s \t\t %.2f\n",theMenu[y].menuItem,theMenu[y].menuPrice);
	}
	gotoxy(30,14);textcolor(BLACK);textbackground(WHITE);cprintf("Enter Choice: ");
	scanf("%d",&choice);

	return choice+11;

}

The error is Expression syntax in function overView.(points to the line where again is declared as a character. Second is Undefined symbol "again" in function overview(where scanf("%c",&again) is and undefined symbol 'n' in function overview, where i put limits for the user to input only 'y' or 'n'.

>}while(again != y && again != n);
You need to put single quotes around y and n.

>}while(again != y && again != n);
You need to put single quotes around y and n.

aw.. i forgot

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.