首页 > 其他 > 详细

disable某种警告

时间:2016-05-13 07:30:47      阅读:218      评论:0      收藏:0      [点我收藏+]

消除警告:

  #pragma warning(disable:4786)

  ZC: 需要消除哪种警告,就在上面填写相应的编号

 

1、

在 VC6中使用vector<string>时,报类似下面的警告:

F:\???\???\ZZ.CPP(22) : see reference to class template instantiation ‘std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >
,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >‘ being compiled
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\vector(61) : warning C4786: ‘??0?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QA
E@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@0ABV?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@1@@Z‘ : identifier was truncated to ‘255‘ characters in the browser information

找到 警告为 warning C4786,于是就使用 “#pragma warning(disable:4786)”

查到该警告的解释:

“该警告主要意思是调试信息的字符超过了255个,将会被截断不显示,并不影响程序运行。”

 

2、

3、

 

disable某种警告

原文:http://www.cnblogs.com/cppskill/p/5484825.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!