Right now I have two classes which both have pointers to each other. When I try to compile it has an error because the program cannot compile one class without already having compiled the other.
It works like this
- Main.cpp includes class A
- Header guard for class A
- Class A includes class B
- Class B includes class A
- Class A already got included so the header guard prevents loading it again
- Class B has no idea what class A is
I just need to be able to reference one class from the other. I'm not incredibly skilled with C++ so this may be obvious but help would be appreciated.