How to fix pointer to incomplete class type is not allowed error?

I'm getting a lot of this error in the following code

1
2
3
4
5
6
7
8
9
	node *ptr = new node;
	ptr->value = x;
	node *toinsert;
	if (!head)
	{
		head = ptr;
		head->prenode = head->nextnode = head;
	}
	else
Last edited on
thanks!
Topic archived. No new replies allowed.