Calling pure virtual function [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Calling virtual functions inside constructors Look at this code. In the constructor of Base class, we can call the pure virtual function using 'this' pointer. Now when I want to create a typed pointer to the same class and casting 'this' to the same type. It throws run time exception 'pure virtual function call exception'. Why is this so ? #include <iostream> using namespace std; class Base { private: virtual