struct has no member named

Try,

struct caketime
{
   double baking_time[4];
   double prepare_time[4];  
};

instead of,

struct caketime
{
   double baking_time [4]={20,75,40,30};
   double prepare_time[4]={30,40,25,60};
};

You should not initialize the array elements inside the structure.

Leave a Comment