Error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Edit: This turned out to be a problem caused by Unreal not including the .generated file when creating the class. I added it in manually and it works fine.

I’m trying to define a ustruct in C++ with this code:

USTRUCT(BlueprintType)
struct FBoardCoordinate
{
	GENERATED_USTRUCT_BODY()

public:

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	int32 Row;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FString Column;
};

But I keep getting this error:

error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Does anyone know what the problem is?

Thanks in advance!

8 Likes

Hi,

I was able to successfully copy/paste your snippet of code into my own project on 4.26.2, as well as in a fresh C++ project using engine version 4.25.4,and both compiled successfully. Is there any more information you can provide us here? Is there any more code within this file that you can provide us?

Here is a similiar thread to this issue that might be useful as well: https://answers.unrealengine.com/questions/301484/missing-type-specifier-int-assumed.html

Thanks for the reply, but I finally fixed it, and it turns out, Unreal didn’t include the .generated file when I created the class. I added it manually and now it works.

26 Likes