Struggling to get access to GeScaledCapsuleRadius() in UE5.

Hiya I am kinda new to developing in Unreal but come from a programing background. I have messed around with the blueprints and am trying to learn how to use c++ with the engine which is what lead to this question.

I am following a tutorial that is all in blueprint and trying to convert it to c++ but I am struggling to access the GetScaledCapsuleRadius() function that exists. It is easy to get in blueprints as you just need access to the Capsule component. When I try to go this in c++ I can get the Capsule Component but can’t call any functions from it. I just get a warning saying pointer to incomplete class type “UCapsuleComponent” is not allowed. Is there a way to call this function and am I just doing something wrong?

ACharacter* player = UGameplayStatics::GetPlayerCharacter(GetWorld(), 0);
player->GetCapsuleComponent()->GetScaledCapsuleRadius();

include “Components/CapsuleComponent.h”
could work in the script you want to call it.