Hey guys im getting an assignment from incompatible pointer type
any idea's why
drinkCat = menu->headCategory; this is the line of code where the error is
Code:
void displaySummary(GJCType* menu, char drinkType, int inputInt)
{
CategoryTypePtr *drinkCat;
if(inputInt == 1)
{
printf("Hot Drinks Summary\n");
printf("---------------------\n");
assert(menu != NULL);
drinkCat = menu->headCategory;
while(drinkCat !=NULL)
{
/* keep printing the next list of hot drinks*/
drinkCat= drinkCat->nextCategory;
}
}
}
typedef struct category* CategoryTypePtr;
typedef struct item* ItemTypePtr;
/* Structure definitions. */
typedef struct price
{
unsigned dollars;
unsigned cents;
} PriceType;
typedef struct item
{
char itemID[ID_LEN + 1];
char itemName[MAX_NAME_LEN + 1];
PriceType prices[NUM_PRICES];
char itemDescription[MAX_DESC_LEN];
ItemTypePtr nextItem;
} ItemType;
typedef struct category
{
char categoryID[ID_LEN + 1];
char categoryName[MAX_NAME_LEN + 1];
char drinkType; /* (H)ot or (C)old. */
char categoryDescription[MAX_DESC_LEN];
CategoryTypePtr nextCategory;
ItemTypePtr headItem;
unsigned numItems;
} drinkType;
typedef struct gjc
{
CategoryTypePtr headCategory;
unsigned numCategories;
} GJCType;