Uboxcomponent is undefined

so i’m following a tutorial for a simple pickup function ,but UBoxComponent is undefined , heres the code (pickup.h):
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include “CoreMinimal.h”
#include “GameFramework/Actor.h”
#include “Pickup.generated.h”

class COOKBOOK_API APickup : public AActor

// Sets default values for this actor’s properties
UBoxComponent* PickupBox;
UStaticMeshComponent* PickupMesh ;

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

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


#include “Components/BoxComponent.h”

…above the include for the Pickup.generated.h will help.

I’m likely doing the same tutorial, and get other errors now in UE4.19. It says it cannot be used as a type. VS2017 was trying to assign it to DecalActor.h, which at least saw it as a type. Time for a different tutorial, as this seems like a moving target if you aren’t using the version they were using.

Adding that line and compiling in UE, not VS, seems to work as expected.

Also, turning of Intellisense errors at least makes editing code nicer with VS. Go to Tools->Options->Text Editor->C/C+±>Advanced->Intellisense and then set “Disable Error Reporting” to true.