I know this might be stupid, but I can't understand what's the usage of this scenario:
- I have a .cpp and .h with class definitions and methods(Let's say, class Class1)
- In Class2's .h file, it's written that class Class1 right before the class definition for Class2.
This is how the source code look:
Class1.h
class Class1
{ //Class 1 definition}
Class2.h
class Class1;
class Class2
{ //Class 2 definition}
So why does the class Class1 appear in Class2.h? It's a huge source code and I've sick of it as i unable to understand the overall flow. Any explaination will give a big help. Thanks for helping!