I have a typedef struct as follows:
Then I create the following:Code:typedef struct { float x, y, z; } point3d;
Then during run time I set the size:Code:point3d *vertices;
My stupid questions is and I can't seem to get this working is I want to do something along the lines of this (setting the value of x in index 3)Code:vertices = (point3d *) malloc(numberOfVertices * sizeof(point3d));
Code:vertices[3]->x = 4.5;