0
How can you use the default value of an argument when it is declared before the other parameters?
func example(int a=1, int b=2) return a+b; int main(){ //how do you use the example function for a given value of b and the default value of a?
2 Antworten
+ 4
ooo I misread. You would have to list b first.
so int example(int b = 1, int a =1)
example(3);
Edit: example fixed