I have this data type:
Code:
typedef struct{
char grapeSet[MAX_GRAPE_SET][MAX_CHAR];
}tGrapeSet;
which belongs to these structures:
Code:
typedef struct {
int wineId;
string wineName;
tWineType wineType;
string wineDo;
float wineAlch;
int wineConservationYears;
float winePrice;
tGrapeSet grapeSet;
} tWineAblePro;
typedef struct{
tWineAblePro wines[MAX_WINES];
int numWinesPro;
}tWine;
typedef struct {
tWine *wines;
int numWines;
tStock *stock;
int numBoxes;
tOrder *orders;
int numOrders;
}tCellar;
then I have a function which adds a wine with grapeSet empty. I'm trying this one, but error "expected expression before token". Deleting this line, then is ok.
Code:
c->wines[c->numWines].wines->grapeSet = {0,0,0,0,0};
What should I do to add an empty grapeSet?