K
kingfox
I wonder if there's a simple way to specify the default
values so that when i call a function designed to receive
an int and a double, i can specify the first but not the
latter. Something like:
int foo (int i, double d) {...}
but invoked by
int a = foo (5);
In Java that was done by simply overloading the
methods and using a bunch of similar definition, calling
each other. Is there a nicer solution?
int foo(int i, double d=0.0)
{
// ...
}
int a = foo(5);