Global Travel-盛开的夕阳,走向家的方向

c/c++/c#/.net/ajax/英文技术文章/系统架构/项目管理

   :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
From http://www.blog.edu.cn/user3/jingshuang/archives/2006/1590091.shtml

VC中使用STL出现的警告.

当在使用STL时,VC有时会提出类似以下的警告:
Compiling...
test.cpp
C:\Windows\Desktop\test\test.cpp(13) : warning C4786: 'std::reverse_iterator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const *,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std
::char_traits<char>,std::allocator<char> > const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const *,int>' : identifier was truncated to '255' characters in the debug information

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/C4786.asp给了很好的解释.
都是因为VC对STL的不完全支持造成的.

解决方法:
#ifdef WIN32
  #pragma warning (disable: 4514 4786)
#endif

posted on 2007-06-22 16:55  Seraph's Zone(WelCome)  阅读(898)  评论(0编辑  收藏  举报