I understand pointers and know what they are and how to declare them. But, the problem is, none of the books, tutorials or guides actually explain why pointers are used.
I come from a PHP background, where pointers are not used. So when I declare a string, I don’t use a pointer.
I see pointers being used in header files when creating methods, and I really don’t understand why they are there for.
Any help would be appreciated.
I think most of the discussion are done on this topic. you can follow these links
What are the barriers to understanding pointers and what can be done to overcome them?
Why use pointers?
http://ruel.me/blog/2010/11/22/why-use-pointers/
http://duramecho.com/ComputerInformation/WhyCPointers.html