Jul 8, 2014 at 10:21am
When you declare a function you can leave out the parameter name if you like.
|
void function(int paramName);
|
Specifying a default argument is no exception. You can still leave out the parameter name.
|
void function(int paramName = 123);
|
|
void function(int = 123);
|
Last edited on Jul 8, 2014 at 10:23am
Jul 8, 2014 at 11:11am
SO how do you view that? int isnt a variable so does that mean function created a temporary variable as type int and pass 123?
Jul 8, 2014 at 11:55am
It means that the default argument for the first parameter is 123.