This answer to the question [How to include a dynamic array INSIDE a struct in C?] Right?
Can anyone tell me if this is correct ?? I'm not sure about the distribution of the second structure:
struct dyn_array my_array = malloc(sizeof(struct dyn_array) + 100 * sizeof(int));
Do not my_array
specify a pointer, for example:
struct dyn_array *my_array = malloc(sizeof(struct dyn_array) + 100 * sizeof(int));
+3
source to share
No one has answered this question yet
See similar questions:
or similar: