4 ms·
This is a little off topic, but does anyone have any good resources to help me wrap my head around pointers in C? Right now they are very confusing to me.
by novia 9y ago
This is a little off topic, but does anyone have any good resources to help me wrap my head around pointers in C? Right now they are very confusing to me.
- Zelizz 9y agoImagine all memory is a big array. A pointer is just an index into that array. A pointer dereference is like accessing something at an array index. A pointer to a pointer is array index to a location where you'll find another array index.
- novia 9y agoI understand pointers conceptually. It's the syntax (in C specifically) that is giving me trouble. I am fine with pointers in ASM.
- iainmerrick 9y agoHmm, it's been a long time since I read it, but this sounds like something that good old K&R probably does well. It's famously short and well-written. It's old-fashioned but I assume (maybe others can correct me) the latest edition is up to date enough that it won't teach you any outright bad habits.
- novia 9y agoThank you very much! I'll give it a look.