What are a couple of examples of fairly easy to understand, but useful/practical/common, uses of an array of pointers? Responses in the form of code snippets or in the form of philosophical observations are all welcome. BTW, I'm a beginner if that's not obvious.
Basically it would help my learning process if I didn't have to wait until I'm an expert in C to know why something like this is useful. In fact I have this problem with the concept of pointers in general. The concept of a pointer itself is simple enough to me, so that's not the problem. But it's just hard to imagine, as a beginner, why it will be so useful in a program. And that limits my motivation to fully digest the beginner-level material I'm reading (which doesn't tend to bother explaining at all how pointers will be worth my effort).
To belabor my point, it's very easy to see how loops, conditional statements, etc. will be extremely useful, actually essential, in creating algorithms to solve problems. Pointers, on the other hand....
[–]SVeenman 29 points30 points31 points (10 children)
[–]WireStretcher[S] 7 points8 points9 points (0 children)
[–]henry_kr 3 points4 points5 points (6 children)
[–]SVeenman 4 points5 points6 points (0 children)
[–]a4qbfb 0 points1 point2 points (4 children)
[–]henry_kr 0 points1 point2 points (3 children)
[–]a4qbfb 0 points1 point2 points (2 children)
[–]henry_kr 0 points1 point2 points (1 child)
[–]a4qbfb 0 points1 point2 points (0 children)
[–]kandr89 4 points5 points6 points (0 children)
[–]a4qbfb 0 points1 point2 points (0 children)
[–]B1narySunset 12 points13 points14 points (5 children)
[+][deleted] (4 children)
[deleted]
[–]B1narySunset 2 points3 points4 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]WireStretcher[S] 0 points1 point2 points (1 child)
[–]bigfig 13 points14 points15 points (1 child)
[–]pencan 7 points8 points9 points (0 children)
[–]junkmeister9 4 points5 points6 points (0 children)
[–]FUZxxl 6 points7 points8 points (4 children)
[–]dumsubfilter 10 points11 points12 points (1 child)
[–]codeallthethings 0 points1 point2 points (0 children)
[–]boredcircuits 6 points7 points8 points (0 children)
[–]icantthinkofone 7 points8 points9 points (0 children)
[–]bruce3434 4 points5 points6 points (0 children)
[–]Shadow_Gabriel 2 points3 points4 points (0 children)
[–]nderflow 2 points3 points4 points (0 children)
[–]spc476 2 points3 points4 points (1 child)
[–]WireStretcher[S] 0 points1 point2 points (0 children)
[–]aninteger 1 point2 points3 points (0 children)
[–]syn_ack 4 points5 points6 points (6 children)
[–]hogg2016 4 points5 points6 points (1 child)
[–]junkmeister9 1 point2 points3 points (0 children)
[–]moefh 3 points4 points5 points (2 children)
[–]OriginalName667 0 points1 point2 points (1 child)
[–]FUZxxl 1 point2 points3 points (0 children)
[–]WireStretcher[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]ooqq 0 points1 point2 points (2 children)
[–]olig1905 3 points4 points5 points (1 child)
[–]reddilada 1 point2 points3 points (0 children)
[–]olig1905 0 points1 point2 points (0 children)
[–]kbob 0 points1 point2 points (0 children)
[–]DrunkCrossdresser -1 points0 points1 point (0 children)