I have the following:
typedef struct Node_struct
{
int number;
Node *nextNode;
Node *prevNode;
} Node;
and later
Node *nodeInSet = lookup(set, number);
nodeInSet->nextNode = (Node *) malloc(sizeof(Node));
nodeInSet->nextNode->prevNode
the last line is saying: "expression must have pointer-to-class type". I can't see how my code is wrong. Since nodeInSet->nextNode
is a Node *
, I think I should be allowed to write nodeInSet->nextNode->prevNode
. What is not working here?