Now I know they're already a lot of threads talking about this. But no matter how much I read, I still can't seem to understand! So I decided to give it a try here - plus, I can ask a question myself here.
Suppose I have 2 classes; class A and class B. Both Have their own .cpp and .h files. I heard that if two classes need to use each other's member variables (quite often in game programming, I've come across a lot, but don't know how to.)
So how do I do forward declaration so that class A can access class B, and class B can access class A?
I might want to implement this on inventory - item class for my game.
Note that class A and class B are NOT declared and defined in the same .cpp file. Thanks