Unexpected type 'FObjectInitializer' error in constructor

I’m trying to create a hitbox ActorComponent that has access to FObjectInitializer, so it can give itself a collision volume to listen for overlap events. The constructor declaration is cut & pasted directly from the tutorial at C++ Only | Unreal Engine Documentation :

#include "IMorphemeNoun.h"
#include "MNHitbox.generated.h"

    class CODEPROJECT_API UMNHitbox : public UIMorphemeNoun
    {
    	GENERATED_BODY()
    public:
    	UMNHitbox(const FObjectInitializer& ObjectInitializer);
    };

However, the constructor declaration triggers an error, "unexpected type ‘FObjectInitializer’ ". I find this confusing, as I use the identical structure to declare constructors with FObjectInitializer in other components- is the problem with another part of the header?

Hmm okay, so that gives me a pointer to a hitbox, but don’t I still need to use ObjectInitializer in the constructor to spawn a BoxComponent the pointer can point to?

Thats kind of wierd, you declare components as properties and then set them up in constructor, like this:

UPROPERTY(VisibleAnywhere)
class UBoxComponent* Hitbox;

Then you set hitbox varables in class component (most importent relative postion and bounds)