Listing 1
(a)class Reservation { public: int resource_type; int resource_id; int user_id; time_t range[2]; }; ... int Reservation::*t = &Reservation::resource_type; Reservation r; int resource_type = r.*t;(b)
class User { public: std::string name; }; class Reservation_Hack { public: int resource_type; int resource_id; User user; time_t range[2]; };