Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

Compiler Error C2243

'conversion type' conversion from 'type1' to 'type2' exists, but is inaccessible

Access protection (protected or private) prevented conversion from a pointer to a derived class to a pointer to the base class.

The following sample generates C2243:

// C2243.cpp
// compile with: /c
class B {};
class D : private B {};
class E : public B {};

D d;
B *p = &d;   // C2243

E e;
B *p2 = &e;
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.