Maybe the above reference it is wrong in that aspect and applies to C++ also. I don't know.
I was under the impression that Arduino IDE is using C++ compiler.
So how does this work / compile in Arduino IDE if struct in plain C could not have functions / methods ?
Was using methods one of the primary features of C++ class?
Thanks,
now the follow-up. The C++ class supplies default constructor , so if I use struct with methods does it also creates default constructor? Also at this point I do not see usage for destructor in ATmel but assume that struct would not have one anyway.
I think I will stick with class for a while.
classes and structs are equivalent except that classes have private default access specifier while it's public for structs. So yes, structs also have default constructor/destructor/assignment operator generated for them.