I am trying to define a Composite class.
A component needs a constructor parameter. How to initialize the component?
Below is my attempt, but it gets a compile error on line 18.
If you are going to have virtual functions, you will need virtual destructors. virtual functions are normally used to make an interface in the base class. Not sure whether you knew that already :+)