Pointer

Hi,guys this is my first post here in this site,i'm not so good in english ,but i think you will understand me.I know pointer is the one of the most troublesome feature in c++,so any one can tell me the usefulness of this feature and tricks to master it easly.Thanks
pointer is the one of the most troublesome feature in c++
You've seen nothing.

any one can tell me the usefulness of this feature
Well, let's see...
* Passing parameters by reference.
* Memory management.
* Arrays.
* Passing functions as parameters (pointers to functions).
* Polymorphism.
* Graph-like data structures (lists, trees, graphs, etc.).
* Dynamic linking.
The above list is almost certainly not complete. Pointers are probably the most important construct of any C-like language.
Last edited on
i guess experience will tell you later.
practice, practice, practice, once you are able to wrap your head around pointer concepts, you will begin to see how fascinating and useful they are. I know, I am in the middle of learning about them myself. I am on my 4th reread of the chapters concerning pointers, and at least the hundreth excercise demonstrating their different attributes.
one thing you might try is the verbalizations of the pointer operators when using them, such as:

ptr =&total ( '&' can be verbalized as 'the address of", therefore the arguement can
be verbalized as "ptr recieves the address of total")

val=*ptr ('*' can be verbalized as"at address", the arguement can be verbalized as "val
recieves value at address ptr")
Last edited on
Thanks for your replaies guys.I will try to read the chapter 5th times.At the first of chapter i got it well,but after few steps ahead,especial in function,i saw myself confused.But i think after few practice as you advice me,i will master it.Thanks alot.!
read the tutorials here. i have read it and i think it discussed pointers very clear for a beginner.
oh! i read it last night,it is very clear for me.i'm starting to get myself in pointer concepts thanks.
Topic archived. No new replies allowed.