I was following the same tutorial and I finally got it to work with the following:
In the FPSCharacter.h (or whatever you called it) make sure you have the following include:
#include “Runtime/Engine/Classes/Camera/CameraComponent.h”
In the FPSCharacter.cpp (or whatever you called it) make sure you have the following includes:
#include “Runtime/Engine/Classes/Components/CapsuleComponent.h”
#include “Runtime/Engine/Classes/Components/SceneComponent.h”
Just to post the rest of the cpp code from this portion of the tutorial:
// Create a first person camera component.
FPSCameraComponent = CreateDefaultSubobject<UCameraComponent>(TEXT("FirstPersonCamera"));
// Attach the camera component to our capsule component.
FPSCameraComponent->SetupAttachment((USceneComponent*)GetCapsuleComponent());
// Position the camera slightly above the eyes.
FPSCameraComponent->SetRelativeLocation(FVector(0.0f, 0.0f, 50.0f + BaseEyeHeight));
// Allow the pawn to control camera rotation.
FPSCameraComponent->bUsePawnControlRotation = true;
This post was able to answer some of the questions, but what I have written here got it to fully work. Thanks for all the previous answers