#include <list>
#include <iterator>

……

list<int>  li = {1,2};
list<int>::iterator it = prev(li.end());    //此时 it 指向 2   

 

相关文章: