使用vector时报很多warning

 

 

我大学学的是C语言,所以研究生阶段想自学C++,毕竟他们有那么多不同。但是在使用vector的时候报warning了————

Compiling...
TextSearch.cpp
f:/workspaceforc++/容器/textsearch.cpp(12) : 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<ch
ar,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
。。。。。。

TextSearch.obj - 0 error(s), 4 warning(s)

 感觉代码没什么问题啊:

#include <vector>
#include <string>
#include <iostream>
using namespace std;

int main()
{
    vector<string> svec;
......

}

 

在网上一查,有人说是编译器的问题,VC的bug,不知道是不是。

只好在#include <vector>前加上预编译忽略此warning:

#pragma   warning (disable: 4786)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值