RecodetheHotelRoomclassofProgrammingProblem4,Section10.3asfollows. Use dynamic memory allocation to reserve space for the guest name. Code a destructor that deallocates the space allocated by the constructor. The destructor should also display a message that it executed. Re- code the main() that you wrote to include use of the constructor, destructor, and new display methods. Compile, execute, and test the resulting program.
Comments
Leave a comment