fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int f(int x, int, int z) {
  6. return x+z;
  7. }
  8.  
  9. int f(int x, double, int z) {
  10. return x*z;
  11. }
  12.  
  13. int main() {
  14.  
  15. cout << f(1,0,2) << endl;
  16. cout << f(1,0.,2) << endl;
  17.  
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
3
2