#include using namespace std; class Base { public: virtual void example()=0; //Denotes pure virtual Function Definition }; class Derived1 : public Base { public: void example() { cout << "Hello "; } }; class Derived2 : public Base { public: void example() { cout << "World"; } }; int main() { Base* arrayOfObjects[2]; Derived1 d1; Derived2 d2; arrayOfObjects[0]=&d1; arrayOfObjects[1]=&d2; arrayOfObjects[0]->example(); arrayOfObjects[1]->example(); getchar(); return 0; }