码迷,mamicode.com
首页 > 其他好文 > 详细

disable某种警告

时间:2016-05-13 07:33:38      阅读:120      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!