VC中使用STL出现的警告.
2006-07-12 11:19
260 查看
当在使用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
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
相关文章推荐
- 当在使用STL时,VC有时会提出类似以下的警告:
- VC++ 如何隐藏使用STL而带来的大量警告
- wince下使用STL出现4786编译警告
- iOS中使用storyboard时出现警告Unsupported Configuration: Scene is unreachable due to lack of entry points and
- VC中使用CFile正确的追加写中文数据到文件不出现乱码-unicode字符集
- vc本地编码程序在日文系统出现乱码无法使用的解决办法
- C++中为何每次使用strcpy()总会出现警告?
- 使用VC6.0打开VC工程出现“内存不足”的RUN TIME ERROR
- 使用VC2005编译出现这个错误
- VC轻松解析XML文件--CMarkup使用方法(解决解析中文字符出现乱码问题)
- [VS2010]_[初级]_[VC++ Express 使用WDK的ATL编译出现的问题解决办法]
- 【mfc】vc++ 使用64位平台编译,运行程序出现0xc000007b错误的解决方案
- VC中使用Matlab Engine出现"无法找到libeng.dll"的问题
- 使用VC时出现error spawning cl.exe解决方法
- VS中使用VC资源编辑器添加变量或事件处理程序出现脚本错误的解决办法
- VC研究: 使用tinyxml编译出现“fatal error C1010: 在查找预编译头指令时遇到意外的文件结尾”
- 在使用GoAgent时出现警告 Load Crypto.Cipher.ARC4 Failed, Use Pure Python Instead
- (使用STL中的数据结构进行编程7.3.15)UVA 630 Anagrams (II)(求一个单词在字典中出现的次数)
- (使用STL中的数据结构进行编程7.3.15)UVA 630 Anagrams (II)(求一个单词在字典中出现的次数)
- 使用C3P0时出现包警告的解决办法