This is only valid if arr is a pointer that points to the second element in an array or a later element. Otherwise, it is not valid, because you would be accessing memory outside the bounds of the array.
Been a while but pretty certain you are not allow negative indices, unless as described in the stackoverflow you are using it to reference/move negatively a position/pointer Code: [Select]This is only valid if arr is a pointer that points to the second element in an array or a later element. Otherwise, it is not valid, because you would be accessing memory outside the bounds of the array.
That's what I thought... But afaik the code is written (thankfully ) in pointer less C! Bizarre. It smacks of an old school C trick I don't know of!
I haven't written anything in C during this millennium, so more useless help coming up... where are X and Y declared? How? are they part of a structure?