I have a C struct with about 17 members struct settings currentProfile and would like to initialise it all members to zero. (I have tried this both with the uber-correct struct syntax and with typedef syntax)
To set all members to zero I use currentProfile = {0}
at this line the compiler gives the erro Expected an expression
Am I initialising correctly?
Thanks
You are doing an (invalid) assignment not an initialization.
To initialize your struct object with all members set to
0:To set all the members of the struct object to
0after its declaration: