如何知道stl的list遍历到最后一个元素

怎么知道stl的list遍历到最后一个元素?
怎么知道stl的list遍历到最后一个元素?

------解决方案--------------------
C/C++ code

if (iter == ilst.end()-1)

------解决方案--------------------
C/C++ code

iter1 = iter2 = list.begin();
if (++iter2 != list.end())
   ++ iter1;