VS2005 -> VS2010 error C2039: 'back_inserter' : is not a member of 'std'

 
error C2039: 'back_inserter' : is not a member of 'std'的解决
2011-09-28 8:36
 
需要#include <iterator>

You probably forgot #include <iterator> in some of your files. That's where things like back_insert_iterator are declared.

In the past, you could get away with forgetting that header file, since many of the other standard headers also included it. VS2010 reorganized the headers for its library implementation to be more standards compliant. As a result, it's much less forgiving of missing headers, and <iterator> is a commonly overlooked one.

posted @ 2012-02-03 17:27  mummily  阅读(829)  评论(0编辑  收藏  举报