I've been struggling with arrays, and though I managed to figure out my problem. I find this thread very strange:
Quote:
Originally Posted by IXix
Looks to me like your offsets are, well, off. The start offset of each 'array' should be the base address of previous 'array' plus it's size...
Code:
memtest1 = 0;
memtest2 = memtest1 + 3;
memtest3 = memtest2 + 6;
Does that do what you're expecting?
edit: DarkStar types faster than I do
|
It seems to me that by coding:
Code:
memtest = 0;
memtest2 = memtest1+3;
etc...
you are suggesting that memtest1 will start from memory 0, and memtest2 will start from memory memtest1+3 = (in this case) 3.
However, as far as I understand you are just storing the number 0 in memtest1 and then storing the number 0+3 = 4 in memtest2.
Am I wrong or are you actually defining an array in memory?
Confused,
Zoab
Edit: I've added an image to show my confusion.