On Monday 07 April 2003 07:08, Steven T. Hatton wrote:
I wasn't sure about the 'p + 1' part, but I did recall the part about incrementing by the 'size' of the object. My curiosity lies with the true meaning of 'size of the object'. This relates back to my awkward errant attempt to explain how memory is allocated for a class. I recall a frient of mine - who is pretty well versed in C - stated that the data in an array goes on the stack. That would mean 'p + 1' is referring to memory locations of the stack, and not the heap.
I think you're looking too closely at details here. The C language doesn't define where things are stored, stack and heap are implementation details of the compiler, not part of the language. If you want to learn the languages quickly, I would suggest you try to take a couple of steps back and focus on the bigger picture. I don't think it's pedagogically right to get bogged down in how gcc implements things. Just a suggestion Anders