I'm tryng to set parameters and it doesn't seem to eb workign for array of floats and 3d array of characters...here's some of the program:
init(&n, products[100], unit[100], amount[100], optimal[100])
void init(int *n, char *products[100][MAXLENGTH], char *unit[100][MAXLENGTH], float *amount[100], float *optimal[100])
{
int count, num;
char product[100][MAXLENGTH], units[100][MAXLENGTH];
printf("How many different products at optimal level can fit into your Fridge?\n");
scanf("%d", &num);
printf("Please select your products, their optimal level and");
printf(" their unit.\nie milk x litres, apple x none:\n");
for(count=0;count < num; count ++)
{
scanf("%s %f %s", product, &optimal[count], units);
amount[count] = optimal[count];
strcpy(*products[count],product);
strcpy(*unit[count], units);
}
printf("To begin, we assume that the fridge is fully stocked\n");
*n = num;
}
it doesn't seem to eb workinf\g...can I send arrays as parameters??