This is a homework assignment so I don't want to post any code, but I'm pretty stumped with the bug that I have.
Currently I have a array that has been malloced and am copying the pointer to the array. Now, I can memcpy and memmove with this array and that works fine.
However, when I do a realloc with it an invalid pointer error comes up - and I have absolutely no idea why.
Can anyone help?
realloc
and friends. – Wolfordrealloc
? – Cowlicktypedef struct {
int something;
int array[5];
} t;
t *error_struct;
int *p_array = error_struct.array;
realloc(p_array, 10);
– Wrinkle