linked list in C++ for cs class