Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Warning (level 4) C4670

Error Message

'identifier' : this base class is inaccessible

The specified base class of an object to be thrown in a try block is not accessible. The object cannot be instantiated if it is thrown. Check that the base class is inherited with the correct access specifier.

The following sample generates C4670:

// C4670.cpp
// compile with: /EHsc /W4
class A

class B : /* public */ A
} b;   // inherits A with private access by default

int main()
       throw b;   // C4670
    catch( B )
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.