I have a class that fetches the next element in a vector container. This vector is an attribute of a class called A.
When I run my "next_element" function I get a segmentation error. I believe it has to do with my constructor.
Thank you Athar and JLBorges for your input.
For now, I will track an index value.
Writing a wrapper for push_back that resets the iterator also works, but I might need to read elements before and after push backs.