Pointers are not as strong as they sound. As others have said, they are variables that contain the address of some other variable. Suppose I wanted to give you directions to my house. I would not give you a photograph of my house or a scale model of my house; I would just give you the address. You could conclude what you need.
In the same way, many languages distinguish between passing by value and passing by reference. Essentially, does this mean that I will pass the whole object around every time I need to reference it? Or, I just give out his address so that others can conclude what they need?
Most modern languages hide this complexity by figuring out when pointers are useful and optimizing it for you. However, if you know what you are doing, manually manipulating pointers can be useful in some situations.
source share