struct orange_t {
short size;
Month expirationMonth;
char** foodCompanies;
int maxNumberOfFoodCompanies;
int sellingPrice;
};
memcpy(orange->foodCompanies,foodCompany,sizeof(strlen(foodCompany)));
printf("%s %s",orange->foodCompanies[0],foodCompany);
My problem. that I really don't know to access rightfully to the first word in orange in foodComapnies, the second and so on ...
What is the right syntax and the right way to do it? I want to write a few foodComapny into orange->foodCompanies, each foodComapny in another place in the array of strings.
orange->foodCompanies = foodCompany?sizeof(strlen(foodCompany))is wrong, it is 4 or 8, depending on whatsize_ton your system is.