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