I've got a struct A and an array of pointers to instances of that struct
I'm trying to access a member directly from the array but I don't know what's the right syntax to do it :
struct A
{
int a;
void** b;
}
A* p = (A*) malloc(sizeof(A));
p->b = (A**) malloc(sizeof(A*) * 3);
//
// something is done
//
int c;
A* test = p->b[0];
c = test->a;
Basically what I'm asking is how do I get rid of the intermediate A* test so I can assign the value of c in one line ?
void**and notstruct A **?p->b = (A**) malloc(sizeof(A*) * 3);is ill-formed, the compiler should complain