Timeline for C: Array of structs in struct of arrays
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 25, 2012 at 13:47 | comment | added | André Oriani |
Perhaps you should change to struct struct_name[3] = {{init-list for 1},{init-list for 2},{init-list for 3}}; Then the compiler know it must expect 3 structs. If you cant fix the number of structs, then you have to break the initialization in other minor initializations and set the pointers among them.
|
|
| Aug 25, 2012 at 13:34 | history | edited | André Oriani | CC BY-SA 3.0 |
added 11 characters in body
|
| Aug 25, 2012 at 13:29 | history | edited | André Oriani | CC BY-SA 3.0 |
added 11 characters in body
|
| Aug 25, 2012 at 13:24 | history | answered | André Oriani | CC BY-SA 3.0 |