BF-it icon indicating copy to clipboard operation
BF-it copied to clipboard

If array index is known then hardcode the offset

Open NeeEoo opened this issue 5 years ago • 1 comments

Lets say that you have int matrix[4][4]; and want to get matrix[1][1] which is item 6 then we can hardcode the ptr offset as >>>>>> and copy the value into the desired cell.

I know that this works for 1 dimensional array but that was before multidimensional arrays.

This might also work with setting an item.

NeeEoo avatar Sep 15 '20 09:09 NeeEoo

Great idea !

elikaski avatar Sep 15 '20 09:09 elikaski