Linked list written in c++