Why does one of my declarations produce an error, while its twin works fine?

Looks like a circular reference to me, especially if it works if you prefix the declaration with “class”.

If your MCharacter inherits from ACharacter, that means that MCharacter includes the character header (which includes Perception.h), while Perception.h also tries to include MCharacter.h.

To solve this, you need a forward declaration, which is precisely prefixing the declaration with class: