Object oriented singly link list implementation in c++