Hello,
I'm trying to dynamically create an array whose contents are pointers to a struct.
Statically, I have something like this:
which works fine. I'd like to change the static allocation to a dynamical one, but I'm always getting segfaults. How to do it?Code:typedef struct {
...
} my_struct;
int main(){
my_struct *array[10];
...
}
Thanks