c++ - std::list iterator, no operator "=" matches these operands -


it's first time using lists sorry if i'm doing stupid

std::list<abstractblock>::iterator i;      (i = universe.getloadedblocks(); != universe.getloadedblocks().end; i++){      } 

universe.getloadedblocks() returns , std::list<abstractblock> list, keep getting error:

1   intellisense: no operator "=" matches these operands         operand types are: std::_list_iterator<std::_list_val<std::_list_simple_types<abstractblock>>> = std::list<abstractblock, std::allocator<abstractblock>>     

in first condition of for() loop, trying assign std::list std::list::iterator, compiler complaining about. code needs more instead:

std::list<abstractblock>::iterator i;  std::list<abstractblock> &blocks = universe.getloadedblocks(); (i = blocks.begin(); != blocks.end(); i++){     //... } 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -