0
What are the pointers used for?
3 Respostas
+ 11
If you are asking about what pointers can do that normal variables can't, you may want to look into the implementation of advanced data structures such as linked lists, binary trees, etc.
http://www.cprogramming.com/tutorial/lesson18.html
+ 2
for assigning values to a variable, for makinh reference of global variables, for pointing address of a variable, for point a variable pointing a variable pointing to an address of a variable.
+ 1
Pointers stores variable address in memory.
This gives you the possibility for example of passing arguments to functions by reference, (avoiding multiple copies of by objects ) manage memory in the heap, ...