Ok. So as you can see, I'm trying to make it so the receiver can communicate with the control centre (its parent). However I seem to be having some trouble with the include statements. (Note: see the error line above).
1. Is this how you could go about allowing 2 way communication between classes (children and parents). And,
Receiver doesn't actually need the implementation of ControlCenter because it only ever points to it, whereas ControlCenter actually needs Receiver's implementation because it uses it as a value-type.
The solution would be to only use a forwards declaration of ControlCenter in Receiver.h rather than including the whole header, like so:
1 2 3 4
class ControlCenter;
class Receiver {
...
In general you should avoid including a header file for a class if you only need to use that class as a reference type, not a value type.