STLiteratordeleteproblem

years ago carl report problem in chinaunix.net: bug of stl on hpux.when delete some element in the stl containers,not work.others ok.

创新互联是专业的秀英网站建设公司,秀英接单;提供成都做网站、成都网站制作,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行秀英网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!

now i encount the problem again,but not bug.and the solution:

for(iterator continue)

{

if(want to delete)

{

delete the pointer;

delete the element and move on the cursor;

}

else

{

increment

}

}

and use the r iterator also will be ok.just because when you delete the elemetn.so the iteraotr changed,then error occurs

[@more@]
新闻标题:STLiteratordeleteproblem
转载来于:http://csruizhi.cn/article/jsgojh.html

其他资讯

Copyright © 2007-2024 成都优众联杰科技有限公司 All Rights Reserved 蜀ICP备2024116266号
友情链接: 网站制作 企业网站建设 成都响应式网站建设 成都网站制作 定制网站制作 温江网站设计 公司网站建设 重庆手机网站建设 网站建设公司 手机网站设计 外贸网站设计方案 品牌网站建设 成都网站建设 成都做网站建设公司 网站制作报价 营销型网站建设 阿坝网站设计 成都网站制作 成都网站建设 企业网站建设 专业网站设计 成都企业网站制作