Func arg | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Func arg

what if i want to use default value of first arg? for example int sum(a=5,b=3); main() { sum(xxx,5); } what should i write(where xxx) if i forgot default value of a?

6th Dec 2017, 11:00 AM
Uktam Khamidov
Uktam Khamidov - avatar
1 Answer
- 1
honestly, you should just add that in a comment or maybe check to make sure the default value is really necessary and that the order they are written makes sense
6th Dec 2017, 5:08 PM
capsloth
capsloth - avatar