Say I have a class called Money which has parameters Dollars and Cents
Money
Dollars
Cents
I could initialize it in the followings 2 ways:
It is totally different.
You have an object which is constructed on the stack. It will have a scope of life that lasts for a code block.
You have an object initialized at some memory address allocated in the heap. It will not be destroyed until you call delete b.
delete b