Why is the AActor not being casted to my custom class?

I am trying to get the actor which was hit by my projectile. I would like to cast that to a class called ‘target’. Here is the code for that: (I have indented the line where the casting actually happens)

void AProjectile::OnHit(UPrimitiveComponent *HitComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, FVector NormalImpulse, const FHitResult &Hit)

	// Only add impulse and destroy projectile if we hit a physics
	if ((OtherActor != NULL) && (OtherActor != this))
		OtherComp->AddImpulseAtLocation(GetVelocity() * 100.0f, GetActorLocation());
		UE_LOG(LogTemp, Error, TEXT("Actor name %s"), *OtherActor->GetName());
            ATarget *TestTarget = Cast<ATarget>(*OtherActor);
		if (TestTarget != NULL)
			UE_LOG(LogTemp, Warning, TEXT("Dead"));

The Actor is lying on the pointer *OtherActor. I tried de-reference the pointer but it did not work. Instead I got this message in the message log:

 C:\Unreal Projects\Seasons\SeasonsGameAlpha\Source\GunMechanicsV2\Projectile.cpp(46) : error C2665: 'Cast': none of the 3 overloads could convert all the argument types

Any Tips?

To* Cast(From* Src)
No need to dereference the OtherActor pointer - simply remove the indirection operator:

ATarget* TestTarget = Cast<ATarget>(OtherActor);

I tried doing that but it gave me some weird errors. I restarted the editor and now it magically works. Thank you very much.