class Node {
public:
int key;
Node *parent;
std::vector<Node *> children;
Node() {
this->parent = NULL;
}
void setParent(Node *theParent) {
parent = theParent;
parent->children.push_back(this); // I can't understand this.
}
};
В функции setParent, в parent->children.push_back(this), почему мы передаем это как параметр и что это будет делать?