I am confused. Do you have to do delete s[]
at the end of the code?
What is the correct way of assigning derived class objects to an array (fixed size) of type base class?
int main () {
Shape *s[2];
s[0] = new Circle(...);
s[1] = new Rectangle(...);
// etc
delete s[] // Do you have to delete ?
}