What is the cause of flexible array member not at end of struct error?
You can only have one flexible array member in a struct, and it must always be the last member of the struct. In other words, in this case you’ve gone wrong before you call malloc, to the point that there’s really no way to call malloc correctly for this struct. To do what you seem to want (arrays … Read more