default parameters without name in c ++
In function declaration/definition, a parameter may have or have not a name, this also applies to a parameter with default value.
But to use a parameter inside a function, a name must be provided.
Normally when declare a function with default parameter
// Unnamed default parameter.
void foo1(int = 3);
void foo1(int a)
{
std::cout << a << std::endl;
}
Then you can call
foo1(); // the same as call foo1(3)
foo1(2);