Code: Select all
int bigarray[5][12][50];
preferences.begin("my-app", false);
preferences.getBytes("calendar", bigarray, 3000);
preferences.end();
Code: Select all
int bigarray[5][12][50];
preferences.begin("my-app", false);
preferences.getBytes("calendar", bigarray, 3000);
preferences.end();
I'm not sure what your various preferences calls do, but one thing that sticks out is that you declare an int array of size 5x12x50 and then call getBytes() using an argument of 3000. I imagine that call is reading 3000 bytes from somewhere and writing them to the array, and 5x12x50 is indeed 3000, but int is 4 bytes, not 1, so your array is actually 5x12x50x4 = 12000 bytes long, not 3000 bytes long.mantas wrote: ↑Mon Aug 19, 2019 9:46 pmI'm trying to store a 3d array in memory
but it doesnt seem to be working any ideas?Code: Select all
int bigarray[5][12][50]; preferences.begin("my-app", false); preferences.getBytes("calendar", bigarray, 3000); preferences.end();
Users browsing this forum: No registered users and 78 guests