I keep getting a compiler error when assigning a variable a specific class type

Hi when ever I give a variable the type of UAppearance_Class the error below happens, VS also randomly flashs can’t open Appearance_Class.cpp for some reason I have tried the opposite with PlayerAppearance and had no problem, if any one could shed some light on this issue it would be appreciated

Error

   [1/5] Module.UnrealCOC.cpp
   E:\UE4 games\UnrealCOC\Source\UnrealCOC\Public\PlayerAppearance_Class.h(24) : error C2143: syntax error: missing ';' before '*'
   E:\UE4 games\UnrealCOC\Source\UnrealCOC\Public\PlayerAppearance_Class.h(24) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
   E:\UE4 games\UnrealCOC\Source\UnrealCOC\Public\PlayerAppearance_Class.h(24) : error C2238: unexpected token(s) preceding ';'
  [2/5] Module.UnrealCOC.gen.cpp
   E:\UE4 games\UnrealCOC\Source\UnrealCOC\Public\PlayerAppearance_Class.h(24) : error C2143: syntax error: missing ';' before '*'
   E:\UE4 games\UnrealCOC\Source\UnrealCOC\Public\PlayerAppearance_Class.h(24) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
   E:\UE4 games\UnrealCOC\Source\UnrealCOC\Public\PlayerAppearance_Class.h(24) : error C2238: unexpected token(s) preceding ';'

PlayerAppearance.h

UCLASS(BlueprintType)
class UNREALCOC_API UPlayerAppearance_Class : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

public:
	UPlayerAppearance_Class();
	
	
	UAppearance_Class *Appear = nullptr;
};

PlayerAppearance.cpp

UPlayerAppearance_Class::UPlayerAppearance_Class() {
	Appear = NewObject<UAppearance_Class>();
}

Appearance_Class.h

UCLASS(BlueprintType)
class UNREALCOC_API UAppearance_Class : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

public:
	UAppearance_Class();

};

Appearance_Class.cpp

UAppearance_Class::UAppearance_Class() {

}

Could you post the entire PlayerAppearance_Class.h file?

You are likely missing the #include for UAppearance_Class.
I recommend using forward declaration in your header and put the #include in your cpp. Also don’t forget to add UPROPERTY()

UPROPERTY() UAppearance_Class *Appear;

.h (forward declare)

class UAppearance_Class;

UCLASS(BlueprintType)
class UNREALCOC_API 
....

.cpp (include)

#include "Appearance_Class.h";