Hello, see this below! Any suggest? Thanks.
void Tree::createTree (vector<Node>*& vec) { }
void foo2 (vector<Node>*& vec) { }
int main () {
vector<Node>* listNode = new vector<Node>();
vector->push_back(Node(2));
tree->createTree(listNode); // this is not ok: 10,000 compile errors
foo2 (listNode); // this ok. Are they different? It seems the same thing to me.....
}
void Tree::createTree (vector<Node>*& vec) { }
void foo2 (vector<Node>*& vec) { }
int main () {
vector<Node>* listNode = new vector<Node>();
vector->push_back(Node(2));
tree->createTree(listNode); // this is not ok: 10,000 compile errors
foo2 (listNode); // this ok. Are they different? It seems the same thing to me.....
}
To copy to clipboard, switch view to plain text mode
Bookmarks