// Function declaration in header
void OnAnimationEnded(UAnimMontage* Montage, bool bInterrupted);
// In implementation
// Declare delegate
FOnMontageEnded EndDelegate;
// Bind it
EndDelegate.BindUObject(this, &UMyClass::OnAnimationEnded);
//Set it
MyAnimInstance->Montage_SetEndDelegate(EndDelegate);