Line trace by channel doesn't work in c++

Hello guys,
My code to create a line trace and hit the landscape doent’s work, while the same thing in blueprint works.
Can anyone help me?

	FHitResult result_private;

	UKismetSystemLibrary::LineTraceSingle_NEW(GetWorld(), FVector(0.0f, 0.0f, -5000.0f), FVector(0.0f, 0.0f, 5000.0f), UEngineTypes::ConvertToTraceType(ECollisionChannel::ECC_Visibility), true, ActorsToIgnore, EDrawDebugTrace::Persistent, result_private, true);

	GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Green, result_private.ImpactPoint.ToString());

watch this. How To Do Line Tracing Using C++ In Unreal Engine - YouTube

GetWorld()->LineTraceSingleByChannel(outHit, startTraceLoc, endTraceLoc, ECollisionChannel::ECC_Camera,QueryParams, FCollisionResponseParams());
if(outHit.IsValidBlockingHit())
{
std::cout << “I am hitting something \n”;
}