The ClassB::Function(const char* str) is different than the ClassA::Function(). You declare ClassB, and then try not passing a param to Fuction(const char* str). You cannot do this since Fuction(const char* str) requires a param. Some C++ guru could answer this better I'm sure, but that is the way the compiler works AFAIK. So why don't you declare ClassA, and call that Function()?