I'm working on a classic Elevator Simulator problem and have a quick question:
How can I access a private data member of the container class from one of the contained classes?
My Building class (container) "has a" vector of Floor objects and "has a" vector of Elevator objects. How can I have the elevators be able to access the building's floors?
My Instructor has recommended that we stay away from declaring friends if possible.