You must specify the default value in the function (constructor) prototype
defined in the header file, e.g.
// In header file:
...
int DoSomething(int nRequired, int nOptional = 0);
...
// In source file:
int MyClass::DoSomething(int nRequired, int nOptional)
{
...
}
All optional parameters must be at the end.
Alek
"gael" <an*******@discussions.microsoft.com> wrote in message
news:22**********************************@microsof t.com...
how to writes classes or functions with optional parameters in c++ ?