I want a function argument to take the value of an other argument as a default value.
My question is: Why am i not allowed to do that ?
void foo(int a, int b = a)
{
}
and is there an other way to do it than that ?
void foo(int a)
{
foo(a,a);
}
void foo(int a, int b)
{
}