Originally Posted by
CommonTater
Code:
init=(VectorT*)malloc (15*sizeof(*VectorT));
Methinks this wont work. One can not dereference a type name. I think you just meant sizeof(VectorT) without the *
Originally Posted by
camel-man
"base operand of -> has non pointer type VectorT"
The -> is the member access operand for a pointer to a struct. So what it's saying is that whatever is on the left of a -> is not a pointer to a struct. You declare init as a VectorT *, but you treat it as an array, so init[i] gives you back a VectorT, not a pointer to a VectorT. Thus, you need
Code:
init[i].list->info = NULL; // You don't want the nul character '\0', you probably want NULL, the null pointer constant
init[i].capacity = cap;
init[i].size = 0;