Include issue in TMAP

I’ve stuck in this issue for several days, please help me if anyone have the answer!

//----------Avatar.h----------

class AAvatar
{

private:

TMAP< FString, Item >

}

//----------Avatar.h----------

//----------PickupItem.h----------

struct Item
{

//definition of this struct

}

//----------PickupItem.h----------

The problem is that I have to let Avatar.h have the definition of struct Item in order not to get compile error C2139

But I can’t include PickupItem.h in Avatar.h since it will generate compile error :

#include found after .generated.h file - the .generated.h file should always be the last #include in a header

Hello, scw000000

In this situation, please place your Pickup Item’s include before include of generated.h file. Your code will look something like this:

#include "GameFramework/Character.h"
#include "PickupItem.h"
#include "Avatar.generated.h"

Hope this helped!

Have a great day!

It worked! thanks a lot!