FlashStorage icon indicating copy to clipboard operation
FlashStorage copied to clipboard

Is there a way to store a struct of struct array?

Open DavideNesi opened this issue 6 years ago • 1 comments

I need to store a struct made of an array of other struct, something like this:

typedef struct {
  boolean valid;
  char label[20];
  char name[20];
} A;

typedef struct {
  A arrayOfAs[50];
} B;

....

FlashStorage(flash_B_store, B);

Is there a way to do it using this library?

DavideNesi avatar May 12 '19 07:05 DavideNesi

using something like this:

typedef struct {
  boolean valid[50];
  char label[50][20];
  char name[50][20];
} B;

could actually be a work around...

DavideNesi avatar May 12 '19 08:05 DavideNesi