loftar wrote:TurtleHermit wrote:pointers and mallocs are such black magic to me still.
I am curious why that is so. Looking out from the inside, it's difficult for me to see why pointers are even mysterious, yet it seems to be common to anyone trying to learn C. Pointers are just memory addresses; nothing more, nothing less.TurtleHermit wrote:Wonder if I should spent a bit more time with C or move over to C++ or try python/java to see how different it is from C.
I would very definitely not recommend learning C++ before understanding C somewhat properly. If you don't understand pointers, C++ is just going to be worse. Python and Java are least different in that regard, though I'd still consider it very sound to understand pointers to do any sort of programming.
My friends told me that pointers are often declared as much, far more much than just memory address. From my yet small experience, I feel like, how to explain it... You get a stick to point at some part of some page inside of the book, but it's very easy to put that pointer outside the book, which make me often wonder, that when I just use pointer, I have to build a box around the book, so it has no chance to escape beside book. Of course it is all theory and I'm sure I haven't got enough practice, but that's how I feel around pointers.