i have a struct with an array of three points in it, for example:
struct POINTS
{
POINT pts[3];
};
then I have another struct with two single points in it like this:
struct EDGE
{
POINT *p1, *p2;
}
is there a way to set p1 to a single element in the attay in POINTS?
here is an example:
POINTS some_points;
EDGE an_edge;
an_edge.p1 = some_points.pts[0];
now p1 is an array of 3 points, but I only need a pointer to pts[0],
and I need to be able to call it without providing an index.
speed is an issue, and thats why I am trying to eliminate the need for copying.
thanks