I've been reading through an implementation of a List (and its node) using classes and I've found a couple things I don't quite understand. Here's the code in the Node class that I don't understand:
class Node {
private:
Data data;
Node* next;
public:
Node*& getNext();
};
Node*& Node::getNext()
{
return this->next;
}
What is *& exactly? I don't get what kind of variable is returned by that method.
I think I get it now, later on I have these lines (inside class List):
Node** node = &first;
node = &(*node)->getNext();
Does that mean I'm storing next's address in node*?
Note: Second question was answered in the comments. Thanks for replies.