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) เหตุใดเราจึงส่งค่านี้เป็นพารามิเตอร์ และมันจะทำอย่างไร