fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int ADD(int n1 = 1, int n2);
  6.  
  7. int main(void)
  8. {
  9. cout << ADD(2);
  10. }
  11.  
  12. int ADD(int n1, int n2)
  13. {
  14. return n1 + n2;
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:5:5: error: default argument missing for parameter 2 of ‘int ADD(int, int)’
 int ADD(int n1 = 1, int n2);
     ^~~
stdout
Standard output is empty