fork download
  1. #include <iostream>
  2.  
  3. void foo(int);
  4. void foo();
  5.  
  6. void foo()
  7. {
  8. std::cout << "Defaulting!" << std::endl;
  9. foo(0);
  10. }
  11.  
  12. void foo(int x)
  13. {
  14. std::cout << x << std::endl;
  15. }
  16.  
  17. int main()
  18. {
  19. foo(0);
  20. foo();
  21. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
0
Defaulting!
0