...
Both an old-style cast and a reinterpret_cast may be used to cast a pointer to an incomplete class. However, the cast may result in a bad address.
| Code Block | ||||
|---|---|---|---|---|
| ||||
class D : public SomeClass, public B {
// ...
};
B *getMeSomeSortOfB() { return new D; }
|
...