I have a file game.h which has this declaration
typedef struct Enemy {
...
}Enemy;
And a function
void moveEnemy(Level* l, Enemy* enemy){
...
}
Level is declared on levels.h, so in game.h I have:
#include "levels.h"
Everything was perfect, until I had to use Enemy in levels.h.
So, in levels.h I added:
#include "game.h"
And now I get a compilation error:
game.h:34:2: error: unknown type name ‘Level’
Level* level;
^
I have include guards on both .h
I don't know why I can't have on file including another.
What can I do?