How to use OnActorBeginOverlap c++ code?

See OnComponentBeginOverlap | Unreal Engine Documentation for an example