NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C2584

'Class' : direct base 'Base2' is inaccessible; already a base of 'Base1'

Class already derives directly from Base1. Base2 also derives from Base1. Class cannot derive from Base2 because that would mean inheriting (indirectly) from Base1 again, which is not legal because Base1 is already a direct base class.

The following sample generates C2584:

struct A1 {
   virtual int foo();
};

struct A2 {
    virtual int foo();
};

struct B1: public virtual A1, virtual A2 {
    virtual int foo();
};

struct B2: public virtual A2, virtual A1 {
    virtual int foo();//{return 1;};
};

struct C: virtual B1, B2 {
    virtual int foo();
};

struct Z : virtual B2, virtual C  {   // remove virtual B2 to resolve this C2584
    virtual int foo();
};

void main(){ 
}