Why is this not compiling?
error C2660: 'Concrete::WriteLine' : function does not take 1 arguments
I know if i add the Line:
//using AbstractBase::WriteLine;
it works, but i dont understand why.
#include "iostream"
class AbstractBase
{
public:
virtual void WriteLine() = 0;
virtual void WriteLine( int i )
{
std::cout<<"AbstractBase"<<std::endl;
}
};
class Concrete : public AbstractBase
{
public:
//using AbstractBase::WriteLine;
virtual void WriteLine()
{
std::cout<<"Concrete Sub Class"<<std::endl;
}
};
int main()
{
Concrete ff;
ff.WriteLine();
ff.WriteLine(1);
return 0;
}
Can someone explain me what happens here. Thanx
Does anyone knows if this behavior is a defined behavior from the C++ standart. Is it mentioned in the C++ standart? Or is it just a kind of compiler behavior?