我得到错误:
error C2682: cannot use 'dynamic_cast' to convert from 'std::_List_iterator<_Mylist>' to 'UserBean *'
执行时:
list<UserBean> * userBeans = getUserBeans();
for(list<UserBean>::iterator i = userBeans->begin(); i != userBeans->end(); i++)
UserBean * newUser = dynamic_cast<UserBean*>(i);
我做错了什么,还是不能将迭代器项转换为对象?