-
Pointers
Hello, i started to learn C++ 1 week ago, i am at Pointer lesson (here) , and i don't understand , what pointers do , when to use, can somebody explain me in clear and short words. I also want some exercise based on pointers, to understand much better. Thanks.
-
A pointer is a type of variable that contains the address in memory of some other variable. For example, a pointer to an int (if appropriately initialised) contains the address in memory of an int.
I'l lleave it to someone else to recommend exercises.
-
Thanks grumpy for reply) ,it helped me to understand a little.
-
For an "exercise", make use of a linked list in your next program. Linked lists are like arrays, but you can extend them without replacing the entire data structure, which is one of their strengths over arrays.