Original Post
Hello, I have a C++ base class that has (among others) a virtual function. It is NOT pure virtual and the base class provides an implementation of the function. All derived classes overrride this function. Now, whenever I create an object of one of the derived classes and call the function, everything works fine. However, when I create a base class object and call the function, my program crashes with a memory error (Unhandled exection...Access violation...the usual windows error message box). When I look at the base class object in the debugger, the __vfptr member (I assume it is the pointer to the vtable) points to NULL. All the derived class objects have the __vfptr member correctly initialized. Does anybody know what could be the problem? (btw I'm using winXP and MS Visual Studio 2005) -Michael