fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int foo (int x);
  5.  
  6. int main() {
  7. cout << foo(1);
  8. return 0;
  9. }
  10.  
  11. int foo (const int x) {
  12. // return ++x; // cause compilation error
  13. return x+1;
  14. }
  15.  
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
2