I am working on a project where I am supposed to put all my #include
s in a file called precomp.h
, and then only #include
that file in my .cpp
files.
The problem is that I have two classes that refer to each other, which does not work. My precomp.h
looks like this:
...
#include "class1.h" // <-- uses class2, does not compile
#include "class2.h" // <-- uses class1
...
Of course switching them also doesn't work. How do I solve this issue in a 'proper' way?