Added few comments in main.cpp. How to use pointers of base class to manage objects of derived class