What does this mean in C/C++?

1. typedef struct pq_item pq_item_t;

2. void *item;

//what is type void I have never seen
//void used like this...
This looks like plain C to me. If you haven't been introduced to void I'm not sure you know what a C struct is. It's something that can hold several types of data. 2. is a generic pointer. Void is supposed to mean as it implies, nothing. Pointers are special variables that can hold memory addresses. Since it void(generic), it can point to any datatype. If it were something like int *item then it would only be able to point to integers.
why typedef struct
and not just struct?
Thank you!
Topic archived. No new replies allowed.