Help understanding structure behaviior in esp now example

I was unclear. I obviously meant the value of the pointer to the cstring that is held as part of the String class within the struct

if you have

typedef struct struct_message {
  char a[32];
  int b;
  float c;
  String d;
  bool e;
} struct_message;

d is a String instance (on a UNO sizeof(String) is 6)

the memory representation is something like this (assuming packed)

and so the first entry is actually a pointer (the address of some other region in memory) to the Heap where the data actually lives.


There was something else at play that tricked you into believing it was working.