I'm trying to access the previously iterated element in a loop going through all the elements of a list.
To be more specific, my loop looks like this:
for (iter=list_object.begin(); iter!= list_object_.end(); iter++)
{
function_1(*iter);
function_2(*PREVIOUS_VALUE_IN_THE_LIST);
}
How do I access this previous value in the list?