I want to use multiple arguments with default arguments together in a same function, can i do this? because both needs to be rightmost rigth? Can someone help please ?
In a given function declaration, each parameter subsequent to a parameter with a default argument shall have a default argument supplied in this or a previous declaration or shall be a function parameter pack.
A default argument shall not be redefined by a later declaration (not even to the same value). [ Example:
void g(int = 0, ...); // OK, ellipsis is not a parameter so it can follow
// a parameter with a default argument
I hope this will help you.
For example you could declare your function the following way