The correct forward declaration is simple:
class Level;
Note the absence of curly braces. This tells the compiler that there is a class called Level , but nothing is reported about its contents. Then you can use pointers ( Level * ) and links ( Level & ) for this class undefined.
Note that you cannot directly create Level instances, since the compiler must know the size of the class to create the variables.
class Level; class Entity { Level &level;
To be able to use Level in Entity methods, you should ideally define Level methods in a separate .cpp file and only declare them in the header. Separating declarations from definitions is C ++ best practice.
// entity.h class Level; class Entity { void changeLevel(Level &); }; // entity.cpp
source share