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