Zrobiłem listę i mam takie coś w momencie dodawania elementu do listy:
nodeStruct newNodeStruct = *new nodeStruct(hwnd);
if (!firstNodeStruct)
{
firstNodeStruct = &newNodeStruct;
firstNodeStruct->nextNodeStruct = NULL;
}
else
{
nodeStruct *temp = firstNodeStruct;
while (temp->nextNodeStruct != NULL)
{
temp = temp->nextNodeStruct; //nie znajduje nextNodeStruct (?)
}
temp->nextNodeStruct = &newNodeStruct;
temp->nextNodeStruct->nextNodeStruct = NULL;
}
I to działa teoretycznie dobrze do momentu w krórym temp->nextNodeStruct
jest NULLem. Wtedy sypie program.
Nie powinno po prostu przerwać pętli?