[C++]I can't fully understand the concept of "&" and "*" as pointers

ELI5:

There are two friends name Tom and Mike.

Mike lives at 69 north high street.

I have a third friend that is a creep and watched Tom and Mike for me through his sniper rifle and keeps tabs on them for me. We will call this creep Pointer.

Right now I am having Pointer watch Mike's house for me, to do that I tell him Pointer = &Mike.

So if I ask him to tell me where he is looking (in code cout << Pointer;) he will tell me 69 North high street.

Now I want to know who is in that house right now (in code cout <<*Pointer) he will tell me Mike.

Mike is leaving his house and a third friend named Tom walked in (In code this can be done a few ways but the easiest is to set Mike = "Tom" ) . I ask Pointer to update me on what is going on at Mikes house.

He says I am currently looking at (cout << Pointer;) 69 North high street, and right now (cout << *pointer) Tom is in there.

I tell Pointer to shoot anyone who is in the house he currently looking at. To do that I would need to tell him where I want him to shoot. (in code: kill(Pointer))

Another way I could ask Pointer to do this is by calling the second method which asks for a person to shoot. (in code: kill(*Pointer))

You will notice that in both Kill functions the shoot function is called. Because the Shoot method requires a single parameter of a Person object though I had to get to in two different ways. The first method takes the address of where to shoot and feeds that into a temporary pointer that holds that address. Then it calls the shoot function on whoever is in that address. The second one instead of feeding an address into kill, I actually look at who is in the address and I send that Person object into the function. This means I simply just need to call the Shoot method on that person in side the kill method.

void kill(person &victim){
    person* temp = victim;

   shoot(*temp);

   }


void kill(person victim){
shoot(victim);

}

void shoot(person p){
cout << p << " has been shot";
}
/r/learnprogramming Thread