# missing type specifier - int assumed error with GENERATED\_BODY()

**URL:** <https://forums.unrealengine.com/t/missing-type-specifier-int-assumed-error-with-generated-body/2746578>\
**Category:** C++\
**Tags:** unreal-engine, question\
**Created:** [August 26, 2026, 9:44am UTC](https://forums.unrealengine.com/t/missing-type-specifier-int-assumed-error-with-generated-body/2746578 "2026-08-26T09:44:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pastelfable](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pastelfable/32/1138306_2.png) [@pastelfable](https://forums.unrealengine.com/u/pastelfable)\
**Post date:** [August 26, 2026, 9:44am UTC](https://forums.unrealengine.com/t/missing-type-specifier-int-assumed-error-with-generated-body/2746578/1 "2026-08-26T09:44:45Z")

</div>

I have this struct in one of my header files:

```auto
USTRUCT()
struct FHostileSpawnRequest
{
    GENERATED_BODY()
    
    EEnemyType EnemyType;
    int32 Remaining = 0;
    TArray<FVector> SpawnLocations;
    
    bool IsValid() const
    {
       return Remaining > 0 && !SpawnLocations.IsEmpty();
    }
};

```

and I’m getting the error:

> 0\>MassEnemyMisc.h(27,2): Error C4430 : missing type specifier - int assumed. Note: C++ does not support default-int  
> GENERATED\_BODY()  
> ^

From what I know compiling with structs tends to cause a lot of problems, but I can’t figure out how to fix it. Does anyone know a solution?

---

<div class="post-metadata">

**Author:** ![MagForceSeven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/magforceseven/32/906563_2.png) [@MagForceSeven](https://forums.unrealengine.com/u/MagForceSeven)\
**Post date:** [August 26, 2026, 11:53am UTC](https://forums.unrealengine.com/t/missing-type-specifier-int-assumed-error-with-generated-body/2746578/2 "2026-08-26T11:53:18Z")

</div>

Depending on the rest of the header file, you may need to include CoreMinimal.h or ObjectMacros.h.

You might also just be missing the include for the generated.h.

---

<div class="post-metadata">

**Author:** ![pastelfable](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pastelfable/32/1138306_2.png) [@pastelfable](https://forums.unrealengine.com/u/pastelfable)\
**Post date:** [August 27, 2026, 11:16pm UTC](https://forums.unrealengine.com/t/missing-type-specifier-int-assumed-error-with-generated-body/2746578/3 "2026-08-27T23:16:21Z")

</div>

I was missing the generated.h! Thank you!
