fork download
  1. struct Node {};
  2.  
  3. void addNode(Node*& f)
  4. {
  5. f = new Node();
  6. }
  7.  
  8. #include <iostream>
  9.  
  10. int main()
  11. {
  12. Node* f = nullptr;
  13. std::cout << f << std::endl;
  14. addNode(f);
  15. std::cout << f << std::endl;
  16. }
  17.  
Success #stdin #stdout 0s 3428KB
stdin
Standard input is empty
stdout
0
0x8700008