用STL的高手看过来,看过来!!!!!!

rockswang 2001-08-08 11:56:06
我的程序用了stl,没有错误,运行也正确,可是出了好几百个一样的warning:
“warning C4786: 'std::pair<std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char
> > const ,IDirectSoundBuffer *>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,IDirectSoundBuffer *,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<IDirectSoundBuffer *>
>::_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<IDirectSoundBuffer *> >::iterator,bool>::pair<std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::bas
ic_string<char,std::char_traits<char>,std::allocator<char> > const ,IDirectSoundBuffer *>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,IDirectSoundBuffer *,std::less<std::basic_string<char,std::char_traits<char>,std:
:allocator<char> > >,std::allocator<IDirectSoundBuffer *> >::_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<IDirectSoundBuffer *> >::iterator,bool>' : identifier was truncated to '255' characters
in the debug information”
已经严重影响到我的编译速度了!
我想应该可以用#pragma warning (disable: 4786)
但我不知道应该加到哪里,而且好像无论怎样也只能禁止掉很小一部分warning.

请不吝赐教,分可以再加!!!!
...全文
99 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
singlerace 2001-08-09
  • 打赏
  • 举报
回复
呵,这80分得的也太容易了。:)
rockswang 2001-08-08
  • 打赏
  • 举报
回复
搞定,
多谢singlerace(独行者) !!!!
ydogg 2001-08-08
  • 打赏
  • 举报
回复
贴代码~
singlerace 2001-08-08
  • 打赏
  • 举报
回复
在include STL时加上pragma:

#pragma warning( disable : 4786 )
#include <vector>
#include <string>
using namespace std;

16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧