Having problems doing the Game-controlled camera tutorial

Hello, I’m new to cpp, and been following some tutorials. but now im getting stuck at https://docs.unrealengine.com/en-US/…als/AutoCamera
Ive completed the first three steps without problems moving on to try for my self ive managed to make the array, and I am now trying to make a array of Structs
But when i try to include it in the header the GENERATED_BODY() comes with an error.
‘This declaration has no storage class or type specifier’
Ive searched a bit and found a couple answers but been unable to get it to work for me.

Also i cant seem to figure out how to make my struct, at first no bugs, but when i try to build it says that it need a prefix F is expected.

So i add that as


struct FCameraStruct

but then it says that it needs a generated_body() but adding that just gives an new error so here i am lost aswell

CameraDirector.h



#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "CameraDirector.generated.h"
#include "CameraStruct.h"

UCLASS()
class QSCPP_API ACameraDirector : public AActor
{
    GENERATED_BODY()
    UPROPERTY(EditAnywhere)
    AActor* CameraOne;

    UPROPERTY(EditAnywhere)
    AActor* CameraTwo;

    UPROPERTY(EditAnywhere)
    TArray Cameras;

    UPROPERTY(EditAnywhere)
    TArray camerasStruct;

    int CurrentCamera;

    float TimeToNextCameraChange;

public:
    // Sets default values for this actor's properties
    ACameraDirector();

protected:
    // Called when the game starts or when spawned
    virtual void BeginPlay() override;

public:
    // Called every frame
    virtual void Tick(float DeltaTime) override;
};


CameraStruct.h



USTRUCT()
struct CameraStruct
{
public:

    float TimeBeforeChanging;

    float BlendTime;

    bool IsMoveable;

};


You could change:

CameraDirector.h


#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "CameraStruct.h"
#include "CameraDirector.generated.h"

.generated.h should be the last.

CameraStruct.h


USTRUCT()
struct FCameraStruct
{
    GENERATED_BODY()

    float TimeBeforeChanging;
    float BlendTime;
    bool IsMoveable;
};

And TArray needs a type as: TArray < FCameraStruct >.

TArray: TArray: Arrays in Unreal Engine | Unreal Engine Documentation