Need help understanding how to access variables in ue4 c++

Hello, Rekenq, could you give me an example of what you mean when you are saying “On your weapon class, create a variable that references the owner of the weapon, for example, an ACharacter* owner variable, (you could use your custom character class too). Then whenever you create this weapon you set the owner variable so it points to your character.” so do you mean create a variable in the weapon class like this for example Aweapon weapon = GetOwner(); or do you mean something else? and I I’m a bit confused on the part where you said

can find the reference for any actor
you want, in almost any part of your
code."

so what do you mean by reference do you mean using the Aweapon variable that is set to the owner of the class? And if so can you give a short example of the both answers so I can see it in code thanks.