R0b0t1
11-12-2007, 02:16 AM
What I need to do is get the points between a line for a certain amount of lines. This would need an array of an array like so:
LinePoints[0][1].x = somex;
LinePoints[0][1].y = somey;
I have a function to do some math and get the points of a line, and this function returns a pointer to an array. I want to assign that functions output to an index in an array, so I can access it like above. Here is the C++ code I am currently using.
POINT* LinePoints = new POINT[][];
for(I = 0; I == NumEdges; I++){
LinePoints[I] = PointsOfLine(Vert[I]->x, Vert[I]->y, Vert[I+1]->x, Vert[I+1].y);
}
Do you see what I need to do? That above code gives me errors though. Is there a way this can be fixed? Please realize that the number of "Vert" is not constant, the user passes a pointer to an array.
P.S.: If this were to work, would this be interfaceable with SCAR?
LinePoints[0][1].x = somex;
LinePoints[0][1].y = somey;
I have a function to do some math and get the points of a line, and this function returns a pointer to an array. I want to assign that functions output to an index in an array, so I can access it like above. Here is the C++ code I am currently using.
POINT* LinePoints = new POINT[][];
for(I = 0; I == NumEdges; I++){
LinePoints[I] = PointsOfLine(Vert[I]->x, Vert[I]->y, Vert[I+1]->x, Vert[I+1].y);
}
Do you see what I need to do? That above code gives me errors though. Is there a way this can be fixed? Please realize that the number of "Vert" is not constant, the user passes a pointer to an array.
P.S.: If this were to work, would this be interfaceable with SCAR?