• Create Account

### #ActualServant of the Lord

Posted 28 December 2012 - 10:53 PM

I never encountered that error before!

Googling brought up this on the third hit. The first answer in that thread explains the error message.

class TransformComponent : BaseComponent

...has 'TransformComponent' inherit 'BaseComponent', but didn't specify whether to inherit it publicly or privately. Private is default.

So 'TransformComponent' privately inherits 'BaseComponent', and since it privately inherits it, you can't convert the pointers.

The fix is to publicly inherit it:
class TransformComponent : public BaseComponent

### #1Servant of the Lord

Posted 28 December 2012 - 10:53 PM

I never encountered that error before!

Googling brought up this on the third hit. The first answer in that thread explains the error message.

class TransformComponent : BaseComponent

...has 'TransformComponent' inherit 'BaseComponent', but didn't specify whether to inherit it publicly or privately. Private is default.

So 'TransformComponent' privately inherits 'BaseComponent', and since it privately inherits it, you can't convert the pointers.

The fix is to publicly inherit it:
class TransformComponent : public BaseComponent

PARTNERS