I want to get object from set<Node>
but I think my function gives me copy of this object. How to fix it?
Node findByNum(int n){
for (set<Node>::iterator it = this->children.begin();it != this->children.end(); it++){
if ((*it).num == n){
return (*it);
}
}
}