c ++ – Converting the Single Reading List to a Double Link List Using Class Inheritance

I managed to create the unique linked list using the class node:

        class node {protected:
int info;
the length;
next node *;
knot * head;

(In public I have work duties). And the other class double_node:

double_node class: public node {
node * prev;

My problem here is using the add function in the double_node class, where I have two problems (modified at least 10 times but I'll post the one with all the errors I've had because I'm not sure that the other versions have corrected these errors.):

void add (int x) {
double_node * p = new double_node (x); // constructor makes next = NULL & info = x
if (head == NULL)
{
p-> prev = NULL;
head = p;
}
other
{
double_node * q = head; // # 1st number, no idea how to initialize a pointer with head
while (q-> next! = NULL)
{
q = q-> next; // # 2nd number
}
q-> following = p;
p-> prev = q;
}
}

The two errors are: invalid conversion of & # 39; node & quot; in & # 39; double_node * & # 39; [-fpermissive].

Any ideas to solve this problem? Thanks in advance!