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