Can someone explain to me why the two private variables width and height should be deleted in the destructor in the class Box? What if I did not delete the two variables in the destructor, what would happen?
The object of class Box will be destroyed but the memory that was allocated for width and height will not be freed. So every time when you will create and destroy objects of type Box unfreed memory will grow up and it can occur such a way that the next time you want to create a new object of type Box the system will respond that it has no enough free memory to allocate it for width and height of the object.
I said numerous times that books of Stroustrup is not good to learn C++. Usually he uses program examples that demonstrate in fact how code should not be written. Stroustrup is a theoretic. He is not a strong programmer.
Now consider the other approach.
The destructor, copy constructor and assignment operator are good enough, so you don't need to rewrite them.
In a container it would be layout contiguously, so less cache misses.