When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
6 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
From what I can tell, in cloneList, you're copying all the list elements backwards. klon[0]->m_Next should point to klon[1], but it points to NULL. klon[1]->m_Next should point to klon[2], but it points to klon[0] and so on
This also ends up making the contact list fail to copy, since you hit NULL as soon as you do klonptr = klonptr->m_NEXT, causing the while loop to stop copying contacts
If you make the for loop go from pocet - 1 to 0 instead of 0 to pocet, then I think it would copy over properly
@faint grove
Please don't delete forum posts. They can be helpful to refer to later and other members can learn from them. In the future you can use !solved to close a post and mark a post as solved.
!solved