Hi I've been messing around trying to pass structures into functions.
my structure looks like this
struct menutype{
int id;
char name[26];
float price;
float multi;
float quanity;
float number;
};
This is what i want in a function
for(int row=0; row<5; row++){menu[row].number=0;
menu[row].number=menu[row].price*menu[row].quanity;
cout<<fixed<<showpoint<<setprecision(2);
cout<<left<<setw(5)<<menu[row].id
<<left<<setw(25)<<menu[row].name
<<left<<setw(10)<<menu[row].price
<<left<<setw(5)<<menu[row].multi
<<left<<setw(10)<<menu[row].quanity
<<left<<setw(10)<<menu[row].number<<endl;}
any suggestions?