Original Post
I''ve never used them before but doing somethings I''ve found that they''re the best thing to use without wasting memory, so I''ve got a simple problem, inserting a new node into the list.
LLPOLYGON* AddPolygon(LLPOLYGON *pRootPoly)
{
LLPOLYGON *pPoly;
pPoly = pRootPoly;
while (pPoly != NULL)
pPoly = pPoly->pNext;
pPoly = (LLPOLYGON *)malloc(sizeof(LLPOLYGON));
pPoly->pNext = NULL;
return pPoly;
}
I know I can add a node to the front of the list and save myself some time traversing but I wanted to first figure out why it doesn''t work. The root node is initialized as NULL, but it stays NULL no matter how many times the func is called... I bet I''m missing something obsuredly simple here...
------------
- outRider -