I’m trying to implement a State Machine. The State Machine will have to have an impact on the object that “HAS” it as a member.
However, I obviously can’t include the “StateMachine” in the “Game” class AND include the “Game” header in the “StateMachine” class.
How do I get around this problem?
As your client class is a member rather than an inheriting daughter, you can not access any private state of the parent (which I’m sure you knew), so you have a limited number of choices: