In line 17, you want to assign the return value of return_node
to a session*
, but the return type of return_node
is a Node<N>*
(Node<Session*>*
) and not a N
(session*
).
Add an accessor function to the node class, and use it to access the data member, e.g:
session* SESSION_COPY;
SESSION_COPY = LIST->return_node(0)->getData();