I\'ve worked with linked lists before extensively in Java, but I\'m very new to C++. I was using this node class that was given to me in a project just fine
On a side note, if the very first member of a class or struct is the next pointer (so no virtual functions or any other feature of a class that would mean next isn't the first member of a class or struct), then you can use a "base" class or structure with just a next pointer, and use common code for basic linked list operations like append, insert before, retrieve from front, ... . This is because C / C++ guarantees that the address of the first member of a class or structure is the same as the address of the class or structure. The base node class or struct would only have a next pointer to be used by the basic linked list functions, then typecasting would be used as needed to convert between the base node type and the "derived" node types. Side note - in C++, if the base node class only has a next pointer, then I assume that derived classes can't have virtual functions.