pointers

hi, right now im stuck on pointers, i somewhat get how to use them, but i dont really know what use they have in actuall programs. i was wondering if someone could please tell me and also maybe give me an assinment that uses pointers.


thank you
Some things of the top of my head: they can be used in classes to reference other classes without needing the entire other class to be stored by value (necessary if, for example, to classes want to reference each other), or in functions so that you can actually modify the data you are passing (though references are better in almost all situations). You also use them for anything dynamically allocated (on the heap).
Topic archived. No new replies allowed.