I am not entirely new to coding, but I am new to C++. I receive the error below often, but find that it comes due to some sort of syntax error (using a minus sign instead of an equal sign, or misspelling a variable name I've already declared elsewhere), but I can't seem to find what's wrong with my most recent error:
And here's the code itself:
void ARCCharacter::Raycast()
{
FHitResult* HitResult = new FHitResult();
FVector StartTrace = FirstPersonCameraComponent->GetForwardVector();
FVector EndTrace = (StartTrace* 5000.f) + StartTrace;
FCollisionQueryParams* CQP = new FCollisionQueryParams();
if(GetWorld()->LineTraceSingleByChannel(*HitResult, StartTrace, EndTrace, ECC_Visibility, *CQP))
{
DrawDebugLine(GetWorld(), StartTrace, EndTrace, FColor(255, 0, 0) true);
if(HitResult->GetActor() != NULL)
{
HitResult->GetActor()->Destroy();
}
}
}
Also, I'm following along with a tutorial, so I'm not sure where my code diverges from the teacher's: link. I'm using XCode to work with C++ in the UE4 editor, and while I'm sure there's a simple solution to this problem, I'd like to learn about common errors beginners may encounter so I can understand the language.

^right below where it found issues. \$\endgroup\$