Suppose I have a struct like:
struct SomeStruct {
PGM_P name;
// Other fields...
};
I would like to write:
SomeStruct s[] = {
{PSTR ("One")},
{PSTR ("Two")}
};
Unfortunately the compiler refuses to compile this. I can work it around with something like:
const char oneStr[] PROGMEM = "One";
SomeStruct s[] = {
{oneStr},
// ...
};
But it's a bit too complicated for my taste. Is there a way to put the strings inside the array declaration?
Thanks in advance!