Original Post
ive been stressing over getting one of my dynamic arrays to function properly and everything compiles fine, it just crashes during runtime though. anyway here is what im trying to do. inside of the any ideas as to what could be causing this problem? thanks alot!
quadnode struct is a pointer of type GLfloat defined as: GLfloat *vert_array. in the constructor it is set to vert_array = NULL;
void quadtree::add(quadnode *n, GLfloat *arr)
{
int pos = n->numFace;
n->numFace++;
n->vert_array = new GLfloat[9]; //the error is always on this line
/*for(int i=0; i<9; i++)
{
n->vert_array[pos*9+i] = arr;
}*/
}