Re: cannot set up function evaluation

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



With complicated I mean: multiple inheritance. I think I know a bit
more about what is going on now:
my pointer to my base class is different from the pointer to the
derived class. I think the debugger ignores the type of the parameter
of my function and simple passes the pointer of the derived class
without casting it to the base class.
This causes the function to 'crash', apparently the debugger runs these
functions in some kind of protected environment and it sometimes has
difficulties to recover from a crash in this environment.

What I am looking for now is a way to avoid that my function is called
with a derived class as a parameter.
Also some documentation about what the debugger does exactly would be
very welcome, do you think Microsoft would be willing to provide such
information?

Anyway, thanks for your reply!
greetings,
eli

.



Relevant Pages

  • Re: why cant derived class pointer cant point to base class object
    ... a base class pointer can to point to derived class ... You can implicitly cast pointers to a base class, ...
    (comp.lang.cpp)
  • Re: inheritance
    ... > constructors of a base class are not also members of the derived class. ... side is _converted_ to A* using the standard "pointer to derived to pointer ... to base" conversion. ...
    (comp.lang.cpp)
  • Base class method that returns a pointer to a derived class?
    ... I want to write a base class that includes a member function that creates an ... instance of a derrived class and returns a pointer to it. ... The derived class definition has to follow the base class ...
    (comp.lang.cpp)
  • Re: cannot set up function evaluation
    ... my pointer to my base class is different from the pointer to the ... I think the debugger ignores the type of the parameter ... of my function and simple passes the pointer of the derived class ... without casting it to the base class. ...
    (microsoft.public.vc.debugger)
  • Re: Pointer to classes when deleted
    ... > virtual deleting an object of the derived class through a pointer ... > to a base class causes undefined behaviour. ...
    (comp.lang.cpp)