Specifying dereferencing inside a structure error
I have a function to create a circular list, I am having compilation problems, not sure if this is the syntax, please appreciate if anyone can help.
void CreateCircularList(struct node** listRef, struct node** tailRef)
{
Push(&*listRef, "String 1");
*tailRef=*listRef;
Push(&*listRef, "String 2");
Push(&*listRef, "String 3");
Push(&*listRef, "String 4");
*(tailRef->next)=*listRef;
}
the compiler puts the error on the last line:
"The type of the underlying base element 'struct node *' is not a structure or a union"
Any ideas why? thank
+3
source to share