Hey guys how would i go about accessing a variable from the item
struct such as itemID how do i access it?
Code: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; } CategoryType; typedef struct gjc { CategoryTypePtr headCategory; unsigned numCategories; } GJCType;



LinkBack URL
About LinkBacks


