I have added a virtual function to AActor, why can't i compile?

This is what a function prototype looks like
you would write it in Actor.cpp



void AActor::Hit()

{
   //Your Function Implementation Goes Here
}


I didn’t test what you wrote but it is possible you are trying to use a name (Hit) that is already in use
try MyHit instead