Hi
keithostertag: I might be jumping in late to this thread, but since you are claiming to be a beginner on using pointers, I thought on suggesting you an useful analogy: Try to think of them a pirates watching through their telescopes! Think about it! That analogy helped me a while back when I started studying pointers.
A special pirate is required for the special type of object they will be appointed to keep an eye on! If that type is
data_t, then the special pirate for it will be
data_t *pp;
Pirates have their unique label, which will allow you to address them! If
pp is how you called your pirate, then its label will be
*pp!
More important: if you want to have access to what the pirate is looking at, then
data_t xx = &pp; will do the work!
Finally, excuse me if the following tip, seems to imply that I might be "overteaching" you, but I love to keep it mind: Every time you decide to use a single letter for a variable name i.e.
p for your pirates, then double type it:
pp. That way, if you later need to replace every instance of that variable in your code, you can safely look for instances of
pp, stablishing that results match the entire word, and then you will not replace the
p in
printf, for example, which would happen if you use
p for your identifier!
Have a nice coding man! \m/