Galian wrote:
Victor Bazarov :
Galian wrote:
Ok, this is my code now:
//CUnknow class
template < class ClassType, REFIID ObjectIID >
class CUnknown : public IUnknown
I am sorry to sound a bit irritated, but didn't I just tell
you to use virtual inheritance *here* AND in the *definition*
of 'IMAPIAdviseSink'? You decided NOT TO follow that and
instead derived virtualy *from* 'IMAPIAdviseSink'. Am I just
being unclear somehow?
Sorry I forgot it, fixed, now CUnknown look like it:
template < class ClassType, REFIID ObjectIID >
class CUnknown : public virtual IUnknown
{
.
.
.
but error message the same as before
OK. Let's put your code aside for a minute. Try the following:
------------------
class I { virtual void foo() = 0; };
class C : virtual public I { void foo() {} };
class II : virtual public I {};
class CC : public C, public II {};
int main() {
CC cc;
}
------------------
Does it compile with your compiler? If it doesn't, your compiler is
non-compliant and you will have to work around its shortcomings. You
will need to re-implement the "offending" functions in the final class
and in them simply call the one you want to work as the overrider.
If the code does compile, please study it and make the necessary changes
to *your* code.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Thank you very much. Sorry for the trouble.