X794: Apartment availability in C++

Complete the function toggleAvailability that toggles the availability of the parameter apartment and updates it so that if it was available (true) it should become vacant (false) and vice-versa. The parameter is a struct already defined as shown:

struct property{
  string name;
  double value;
  int rooms;
  bool availability;

Your Answer:


Your feedback will appear here when you check your answer.