I inherited some C++ code and it has me stumped.
Have a class declared like so.
class CIENavigator : public CWTLAxControl<CIENavigator,iWebBrowser2>
Instance like so
CIENavigator * pCIE = &CIE;
Gets this compile error
1>.\IENavigator.cpp(446) : error C2440: 'initializing' : cannot convert from 'IWebBrowser2 **' to 'CIENavigator *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Although CIE is declared as CIENavigator, it thinks the type of &CIE to be IWebBrowser2 **
If I force the cast like so:
CIENavigator * pCIE = (CIENavigator *) &CIE;
It compiles, but the pointer is indeed the wrong pointer.
I note the class name appears in the declaration of itself, but I don't know what the significance of that is.
I'm not up on Class templates.
How do I get the right CIENavigator object (CIE) address?