+ 2
Please tell me how to remove error
#include <iostream> using namespace std; int func(int m=10,int n){ int c; c=m+n; return c; } int main() { cout<<func(5); return 0; }
2 Answers
+ 5
In line 3,
You have to declare constant at last, it is necessary to declare variables first in function parameters
Solved: int func(int n, int m = 10){