Edit

Share via


Compiler Error C3247

'class1' : a coclass cannot inherit from another coclass 'class2'

A class marked with the coclass attribute cannot inherit from another class marked with the coclass attribute.

The following sample generates C3247:

// C3247.cpp
[module(name="MyLib")];
[coclass]
class a {
};

[coclass]
class b : public a {   // C3247
};
int main() {
}