+ 2

How can I leave the first parameter at default and only set the second parameter?

15th Jul 2016, 1:29 PM
Bla
3 odpowiedzi
0
set a default for the first parameter.
19th Jul 2016, 5:45 PM
Sandra Keller
Sandra Keller - avatar
0
Can someone suggest a better answer?
10th Sep 2016, 6:43 PM
nicok
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?
21st Dec 2016, 4:03 PM
Jamie Andrews