+ 2
How can I leave the first parameter at default and only set the second parameter?
3 Answers
0
set a default for the first parameter.
0
Can someone suggest a better answer?
0
for your first parameter assign it to a number:
int something(int a = 45, int b) {
}
This leaves integer 'b' to be assigned later and sets 'a' to a default value
Is that what you meant?