anyway what is the difference between passing a pointer into a function which has a pointer as the parameters like upgradeWeapons and passing a memory address into the same function both seem to work fine and I get the same result but I thought when I passed in a memory address I might get an error so how come this is legal and what is the difference?
anyway what is the difference between passing a pointer into a function which has a pointer as the parameters like upgradeWeapons and passing a memory address into the same function both seem to work fine and I get the same result but I thought when I passed in a memory address I might get an error so how come this is legal and what is the difference?
There is no difference. A pointer is a memory address. More specifically, a pointer is an integer, and the value of that integer is a memory address.
When you pass a pointer into a function, you are passing in a memory address.