I am working with dynamic lists. I found that if you have inserted (.push_back) an object at the end of the list and you try to get the iterator of that position (.end), the program doesn´t work fine. However, if you insert the object at the beginning (.push_front), you can get the iterator (.begin) without any problem.
Is there any bug with .end?
That's not the correct way to find the last element.
The past-the-end element is the theoretical element that would follow the last element in the list container. It does not point to any element, and thus shall not be dereferenced.