C++ instantiation of object on the heap demo