c - expected identifier or ‘(’ before ‘=’ token -
i'm having trouble line:
ut_slot = malloc(tab_size * sizeof ut_slot_t);
these variables defined in header file:
typedef struct _ut_slot { ... ... } ut_slot_t, *ut_slot;
error written in title, help?
change
ut_slot = malloc(tab_size * sizeof ut_slot_t); to
ut_slot_t *ut_slot = malloc(tab_size * sizeof *ut_slot); and remove ut_slot typedef:
typedef struct _ut_slot { ... ... } ut_slot_t;
Comments
Post a Comment