How to call a Widget function in C++

I already watched that series, but I didn’t find my problem.
I decided to choose the first option from @anonymous_user_f5a50610

I created a variable

UFunction* ChangeText

To assign this: ItemPickedHUD_Instance->FindFunction(FName("ChangeText"));

i need to get the current Game Mode because ItemPickedHUD_Reference is a variable of the GameMode.

I tried doing so: AMyProjectCPPGameMode* GameModeRef =(AMyProjectCPPGameMode*)()->GetAuthGameMode();

But then If i do this

ChangeText = GameModeRef->ItemPickedHUD_Reference->FindFunction(FName("ChangeText"));

I get this error

This maybe because inside the AMyProjectCPPGameMode.h I declare

class UUserWidget* ItemPickedHUD_Reference;

using a Forward Declaration.

So, how to solve the problem?
I tried including “Blueprint/UserWidget.h” or something like that, but it didn’t work (no such file or directory)