[updated, thanks to Richard]
C++ default arguments[
^] must be specified
either in function (or method)
declarations or in function (or method)
definitions.
Specifying it in
both declaration and definition is an error.
The preferred approach is specifying it only in function (or method)
declarations.
For example
int my_add( int a, int b = 5);
int my_sub( int a, int b = -1);
int my_add( int a, int b = 5)
{
return (a + b);
}
int my_sub( int a, int b) {
return (a -b);
}
[/update]