问题:
编译时,总是报告警4786。是因为使用了map的stl方法。无影响可以屏蔽
D:\prg test\helloworld\helloworld.cpp(44) : warning C4786: 'std::reverse_bidirectional_iterator<std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::iterator,std::
pair<int const ,int>,std::pair<int const ,int> &,std::pair<int const ,int> *,int>' : identifier was truncated to '255' characters in the debug information
解决办法:
#pragma warning(disable:4786)可以屏蔽该告警,这句话放到所有stl头的include之前
本文介绍了解决编译时出现的C4786警告的方法,此警告与使用STL中的map有关。通过在代码中加入特定的预处理指令可以有效地避免这一问题。
2357

被折叠的 条评论
为什么被折叠?



