I do not know how to get around this error. I must not be assigning the same type. Keep receiving an '(strict) incompatible pointers in ='
#define POOLSZ 53
typedef struct{
int eventnr;
int eventfq;
struct olnode *next;
}olnode;
olnode pool[POOLSZ];
olnode *avail
void initpool()
{
int i;
for(i = 0; i < POOLSZ-1; i++)
pool[i].next = &pool[i+1]; /*This is the error line */
pool[i].next = NULL;
avail = pool;
}
This line makes a pointer to struct olnode
:
struct olnode *next;
But you don't define such struct. You only have an anonymous struct, typedef
ed to olnode
.
Fix:
typedef struct olnode {...} olnode;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With