I need to compute the total food (pounds per week) requirements for each TYPE of McDonalds in a local area. The Types of McDonalds range 1-10. They're are represented as McDonalds[].Type. The other column in the data file is pounds per week.
How do I compute the total food per week of each TYPE of McDonalds
class McDonalds
{
public:
void load_data();
//loads data from DATA_FILE into array
int total_food_by_type();
//computes total food requirements for each TYPE of McDonalds
private:
struct McInfo
{
int type;
//McDonald Type
int pounds;
//McDonald FOOD
};
};
int main ()
{
ifstream in_data1;
string line;
int size;
McInfo *McArr;
McDonalds information;