I need to fill a dae_prim *array_prim; where dae_prim is a class I created.
I want to use C style because I will pass all those data to OpenGL.
When I’m trying to make a : mesh->array_prim[i] = mysexyprim it fails with a “subscript requires size of interface”.
I think I understand the problem (Obj-C wants me to use a NSArray) but how can I bypass this?
More code
class meshes:
@public:
dae_prim *prims;
int primcount;
.
model->meshes->prims = malloc(sizeof(dae_prims*) * model->meshes->primcount);
dae_prim *prims = [[dae_prim alloc]init];
model->meshes->prims[1] = prims; //here is the problem
You need to use a double pointer for meshes->prims, as you want an array of pointers.
Cheers.