// PL8/polymorphicvarray.cpp // Demonstrate how to use an array of baseclass pointers to achieve polymorphism // Niels Walet, Last modified 06/01/2022 #include class particle { public: virtual ~particle(){} // Need this! virtual void info()=0; // pure virtual function }; class electron : public particle { private: int charge; public: electron() : charge{-1} {} ~electron() {std::cout<<"Electron destructor called"<