struct IA
{
virtual void Init() = 0;
.....
};
struct A : public IA
{
void Init() {};
.....
};
struct B : public A
{
int Init() { return 1; };
};
With such design i got error C2555: 'B::Init': overriding virtual function return type ...
Can i somehow conceal Init() from A, i don't want to conceal other A's functions. Class A used from other places as A class not only through B class.
EDIT: I need to have two Init functions in the hierarchy with only difference in return types. I don't need A::Init to be called on objects of B type. Actually i can do it by
struct B : private A
{
using A::.... // all, except Init
int Init() { return 1; };
};
But there are a big lot of functions in A:(