Hi all,
I'm trying to understand the code at the bottom of my post. I am working with a someone else's code and don't have a lot of experience in C++. My problem is that in the second loop it is accessing a field in an object pointed to by the first iterator. However, surely this iterator is now equal to the end of the array as it is the exit condition of the first loop.
Would someone be able to explain to me how this is working?
It is supposed to output a graph into DOT format. This part of the code is for outputting the vertices. I'm glad I'm not being stupid in thinking this doesn't make sense.