1/*
2You are probably redefining the default parameter in the implementation of the function.
3It should only be defined in the function declaration.
4*/
5//bad (this won't compile)
6string Money::asString(bool shortVersion=true){
7}
8
9//good (The default parameter is commented out, but you can remove it totally)
10string Money::asString(bool shortVersion /*=true*/){
11}
12
13//also fine, but maybe less clear as the commented out default parameter is removed
14string Money::asString(bool shortVersion){
15}
16