当在使用STL时,VC有时会提出类似以下的警告:
来源:互联网 发布:感谢网络让我遇见你 编辑:程序博客网 时间:2024/05/16 12:28
当在使用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
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出现的警告.
- 在编译工程时,有时会遇到类似“ld: library not found for -l…” 的错误提示
- 这是我在写程序中经常使用的一些函数,但有时会忘.将积累以下……
- 在EVC下使用STL时的警告处理方法
- VC++ 如何隐藏使用STL而带来的大量警告
- 以下代码在执行的时候,有时会打印出5行甚至6行输出,为什么?(VC6.0)
- 当所有人在说在中国玩类似kik应用会死的时候,微信却活了
- VC++ 当我在界面上使用classwizard时,会弹出 Parsing error对话框,提示:Parsing error:Expected ")" input lin
- Chrome还会在以下这两种情况下显示“Not secure”警告……
- message 在不同的系统,有时会显示出现,有时不出现
- 当我们在程序中使用Packet32.h进行编程时,可能会遇到以下问题:
- 在java读取文件时,有时会出现乱码,解决方法
- 在释放资源时,为什么有时会比较慢?
- 使用drupal6有时会碰到任何页面都“page not found”时的解决办法
- 解决VC中的有关STl 的4786编译警告
- 避免VC报很多关于stl的警告
- VC6使用STL时很多C4786警告
- SE16+debug权限删除表数据
- 删除CR 程序
- 页面IE打印设置
- typedef
- 基于hibernate缓存机制的查询性能优化研究
- 当在使用STL时,VC有时会提出类似以下的警告:
- apache-ant-1.6.0-77.1.i586.rpm 可以在网上下载
- 【函数】弹出-月份选择
- 最强的对手,不一定是别人,而可能是我们自己。在超越别人之前,先得超越自己!
- PPPOE Discovery协议详解
- 一段DIV锁屏的代码,提示消息始终处于当前屏的中央
- 如何设置防火墙使局域网内正常访问
- 简单的I2C协议理解!(无图)
- Java中用Servlet容器实现程序监听