如下错如何更改
如下错怎么更改?如下错怎么更改?C/C++ codevoid AMobileDeviceListenerImpl::AMDeviceNotificationCallbac
如下错怎么更改?
如下错怎么更改?
C/C++ codevoid AMobileDeviceListenerImpl::AMDeviceNotificationCallback(am_device_notification_callback_info *callback){ AMobileDeviceListenerImpl listener = AMobileDeviceListener::GetInstance(); if(ADNCI_MSG_CONNECTED == callback->msg) { for(vector<AMobileDevice*>::iterator iter = listener.lpDeviceList.begin();iter != listener.lpDeviceList.end();++iter ) { (*iter)->OnConnected(callback->dev); } }}
error C2440: 'initializing' : cannot convert from 'std::_Vector_iterator<_Ty,_Alloc>' to 'std::_Vector_iterator<_Ty,_Alloc>'
error C2678: binary '!=' : no operator found which takes a left-hand operand of type 'std::_Vector_iterator<_Ty,_Alloc>' (or there is no acceptable conversion)
[解决办法]vector<AMobileDevice*>这个类型和listener.lpDeviceList不匹配
[解决办法]类型不匹配