将 VC6 代码迁移到 VS2008 时出现以下错误。此代码在 VC6 中运行良好,但在 VC9 中出现编译错误。我知道这是因为编译器发生了重大变化。有什么问题,我该如何解决?
error C2440: 'initializing' : cannot convert
from 'std::_Vector_iterator<_Ty,_Alloc>'
to 'STRUCT_MUX_NOTIFICATION *'
代码
MUX_NOTIFICATION_VECTOR::iterator MuxNotfnIterator;
for(
MuxNotfnIterator = m_MuxNotfnCache.m_MuxNotificationVector.begin();
MuxNotfnIterator != m_MuxNotfnCache.m_MuxNotificationVector.end();
MuxNotfnIterator ++
)
{
STRUCT_MUX_NOTIFICATION *pstMuxNotfn = MuxNotfnIterator; //Error 2440
}