Question: im trying to create a function that mallocs an instance...
i'm trying to create a function that mallocs an instance and it's pointer (d). This is what I have, but I wanted to see if it was correct? it's supposed to be the basis of an array of integers.
struct intRA* m_intRA(int length)
struct intRA *ra = malloc(sizeof(struct intRA));
ra->length = length;
ra->d = (int *)malloc(length * sizeof(int));