Question: write destructor and copy constructor for Hotel class in c++ pls struct Room { int size; int num_beds ; }; class Hotel { public: Hotel(string

write destructor and copy constructor for Hotel class in c++ pls

write destructor and copy constructor for Hotel class in c++ pls struct

struct Room \{ int size; int num_beds ; \}; class Hotel \{ public: Hotel(string hotel_name, vector v) \{ name = hotel_name; num_rooms =v.size(); rooms = new Room[num_rooms]; for (int i=0; i i++ ) {. rooms [i].size =v[i].size; rooms [i].num_beds =v[i]. num_beds; \} \} void display() \{ cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!