VS2010中的迭代器 [英] Iterator in VS2010

查看:254
本文介绍了VS2010中的迭代器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在将VC ++项目从VS2005移植到VS2010.在VS2005中,我们可以直接使用迭代器来访问其容器对象.例如,我可以检查

We are porting our VC++ projects from VS2005 to VS2010. In VS2005, we can directly use iterator to access it's container object. For example, i can check

if(myIterator == NULL),

if(myIterator == NULL), 

但是在VS2010中,我们需要为此使用_Ptr迭代器成员.

but in VS2010, we need to use _Ptr member of iterator for this as below.

if(myIterator._Ptr == NULL)

if(myIterator._Ptr == NULL)

在任何地方都没有使用Iterator的_Ptr成员.我们正在移植400多个项目,许多项目正在使用迭代器.我们可以依靠_Ptr,还是微软将在下一个版本中打破它?

Using _Ptr member of iterator is not documented anywhere. We are porting more than 400 projects and many of the projects are using iterators. Can we rely on _Ptr, or Microsoft will break this in next version?

预先感谢

呼吸

推荐答案

sree,

您身边的myIterator类型是什么类型?您能显示一些适用于VS2005但不适用于VS2010的代码吗?

What's the type of myIterator type on your side? Could you show some codes which works on VS2005 but not on VS2010?

致谢

Yi


这篇关于VS2010中的迭代器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆