Original Post
how do you go about dynamically allocating a 2-dimensional array (in c++)...
here''s my problem: i am making a model class that will have an array of vertices, which is itself an array of three elements. so this array of vertices would be:
float vertices[x][3], where x is the number of vertices in the model. the problem i am facing is i want this ''x'' to be arbitrary, so some models can have more or less vertices than others.
i know how to do this with a 1-d array, with a single pointer (ie ''float *vertices, and then vertices = new float[x]), but i don''t know how for 2d...
any suggestions? thanks
<(o)>