Call Function C++ Class ( No Blueprint )

Hello,
I have a problem. My classes have a PlayerController. A function of this class.
Class name: AtdaController
Function name: showMouseCursor();
and the other a HUD class. I need to call this function in my HUD class. Please help me.

Please help

From HUD?

APawn* Pawn = GetOwningPawn();

if(Pawn && Pawn->Controller && Pawn->Controller->IsA(AtdaController::StaticClass())) {
          ((AtdaController*)Pawn->Controller)->showMouseCursor();
}

All classes related to eachother in anyway usally keep refrences to eachother, so use API refrence to check how to get specific object of a class.