How to judge if an iterator is used before.

来源:互联网 发布:中天制片软件下载 编辑:程序博客网 时间:2024/04/30 21:51

list<int> ListInt;

list<int>::iterator it = ListInt.end();

 

if ( it == ListInt.end() )

{

//unvalid.

}

else

{

//valid

}

 

http://www.itzhe.cn/news/20080101/40229_3.html

 

原创粉丝点击