当在使用STL时,VC有时会提出类似以下的警告:

 当在使用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

你可能感兴趣的:(c,basic)