I'm getting this compile message based on the below sample code. Yet I've populated a vector with strings in other ways and not seen the compilte error:
c:\program files\microsoft visual studio\vc98\include\vector(60) : warning C4786: 'std::vector<std::basic_string<char,std::char_trai ts<char>,std::allocator<char>
>,std::allocator<std::basic_string<char,std::char_ traits<char>,std::allocator<char> > >
>::~vector<std::basic_string<char,std::char_traits <char>,std::allocator<char>
>,std::allocator<std::basic_string<char,std::char_ traits<char>,std::allocator<char> > > >' :
identifier was truncated to '255' characters in the debug information
Using MSVC++ 6.0Code:#include <vector> #include <string> #include <iostream.h> void main() { //Declaration for the string data std::string strData = "One"; //Declaration for C++ vector std:: vector <std::string> str_Vector; str_Vector.push_back(strData); strData = "Two"; str_Vector.push_back(strData); strData = "Three"; str_Vector.push_back(strData); strData = "Four"; str_Vector.push_back(strData); }
NEVER MIND:
"You can ignore these warnings.
They're a well known bug with the compiler.
You can remove them via following code:
#pragma warning( disable : 4786)"