It is a simple problem.
The compiler (mingw32) says
[error]
main.cpp:27: error: no matching function for call to `ClassB::Function()'
main.cpp:17: note: candidates are: bool ClassB::Function(const char*)
[/error]
#include <iostream>
class ClassA
{
public:
bool Function ()
{
return true;
}
};
class ClassB : public ClassA
{
public:
bool Function (const char* str)
{
return true;
}
};
int main()
{
ClassB b;
b.Function();
return 0;
}
I do not understand the compilers problem.
Because A::Function and B:Function has different names because the
signaturs (name+parameters) are different.
Shouldn't it work in iso-c++? Is it a compiler problem or I am wrong
understanding standard c++?