I forgot to mention that in the real program I will have about 50 items inside the struct, with meaningful names. Formats are bool, byte, int and float.
I can't compare them one by one (s.one==default.one || s.two==default.two ....), because it would be non practical (especially when I add/remove parameters, I want to make this change in one place only, which is where I declare the struct datatype).
A bitwise comparison of the whole struct would be perfect.
Why I don't find memcmp() in the arduino reference?
if (memcmp(s_temp, s, sizeof(s)!=0)) {
}
From the error message seems that the format of the arguments should be: int memcmp(const void*, const void*, size_t)
Passing the pointer compiles fine. I'll see if this works
if (memcmp(&s_temp, &s, sizeof(s)!=0)) {
}