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