I'm creating the following struct pointer type:
typedef struct hashmap_item {
hashmap_item_t prev;
hashmap_item_t next;
char* key;
void* value;
int time_added;
} *hashmap_item_t;
But I get the following error:
hashmap.h:5: error: expected specifier-qualifier-list before "hashmap_item_t"
I'm assuming this is because the struct I'm defining contains itself as a field. How can I avoid this? Is there a way to forward-declare structs?
Thanks!