I'm currently working on a small text game for a class and I've hit a bit of a bump. When i try to compile, I get an error saying that one of the classes has not been declared. I figured out that it's because two classes are included in each other, but I can't figure out how to fix it...
I believe I have ran into this issue before myself.
The solution I found helpful for my own projects:
The way I fixed it was only including the enemy header and the player header files into the main cpp file.
The reason why it might be doing that:
I think what is going on is that it's trying to add the player class into the enemy class and then adding it into the player class again and then it has two definitions of the player class and the complier doesn't know which one it needs to use.