struct AD_SINT32Type* = NULL;
foo = (struct mystructArray*)malloc(sizeof(struct mystructArray));
foo[0].x = 45;
foo[0].y = 90;
coords[0] = &foo[0];
foo = (struct mystructArray*)realloc(foo, 2 * sizeof(struct mystructArray));
foo[1].x = 30;
foo[1].y = 15;
coords[1] = &foo[1];
After this code "coords[1]"
points as intended, but "coords[0]"
points to an the old address before the reallocation. Is there a way to automatic adapt the address "coords[0]"
points to?