使用vector時報很多warning

2021-05-22 20:50:18 字數 715 閱讀 4611

我大學學的是c語言,所以研究生階段想自學c++,畢竟他們有那麼多不同。但是在使用vector的時候報warning了————

compiling...

textsearch.cpp

f:/workspaceforc++/容器/textsearch.cpp(12) : warning c4786: 'std::reverse_iterator,std::allocator> const *,std::basic_string,std::allocator>,std::basic_string,std::allocator> const &,std::basic_string,std::allocator> const *,int>' : identifier was truncated to '255' characters in the debug information

。。。。。。

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

感覺**沒什麼問題啊:

#include

#include

#include

using namespace std;

int main()

在網上一查,有人說是編譯器的問題,vc的bug,不知道是不是。

只好在#include 前加上預編譯忽略此warning:

#pragma   warning (disable: 4786)

Ubuntu使用gedit時報waring

gedit 1953 gtk warning attempting to store changes into root local share recently used.xbel but failed 建立檔案 root local share recently used.xbel.kayl7v...

Ubuntu使用gedit時報waring

gedit 1953 gtk warning attempting to store changes into root local share recently used.xbel but failed 建立檔案 root local share recently used.xbel.kayl7v...

vector 簡單使用

vector是c 標準模板庫中的部分內容,它是乙個多功能的,能夠操作多種資料結構和演算法的模板類和函式庫。vector之所以被認為是乙個容器,是因為它能夠像容器一樣存放各種型別的物件,簡單地說,vector是乙個能夠存放任意型別的動態陣列,能夠增加和壓縮資料。為了可以使用vector,必須在你的標頭...