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
In Java
Node m_node
stores a pointer to another node. You don't have a choice about it. In C++
Node *m_node
means the same thing. The difference is that in C++ you can actually store the object as opposed to a pointer to it. That's why you have to say you want a pointer. In C++:
Node m_node
means store the node right here (and that clearly can't work for a list - you end up with a recursively defined structure).