This is caused by the fact that C++ uses default arguments at the client side, instead of compiling them into the function body. This leads to some paradoxes like this:
1 2 3 4 5 6 7 8 9 10
class Base {
virtualvoid print(lang: string = "C++") { cout << lang << " rocks"; }
};
class Derived: public Base {
virtualvoid print(lang: string = "PHP") { cout << lang << " sucks"; }
};
Base* object = new Derived();
object->print(); // guess what it prints?