suppose that Box is a class
now
Box mybox = new Box();
this first creates a reference variable and then mybox is dynamically allocated memory
but what difference does it create in allocating memory to a class instance dynamically or during compile time?
here what is the advantage of such memory allocation ?
we havent used such allocation in c++