simple... warning in STL!! Why??
-
Hi all, When I compile this very simple program I get some warnings... but I don't know why? Here is this program:
int i = 0; std::vector str\_vect1; std::vector str\_vect2; std::vector::iterator it1; std::vector::iterator it2; // GET str\_vect1 str\_vect1.resize(5); for(it1 = str\_vect1.begin(), i = 0; it1 != str\_vect1.end(); it1++, i++) { cout << "str\_vect1\[" << i << "\] = "; cin >> \*it1; } // COPY str\_vect1 into str\_vect2 str\_vect2.resize(str\_vect1.size()); for(it1 = str\_vect1.begin(), it2 = str\_vect2.begin(); it1 != str\_vect1.end(); it1++, it2++) { \*it2 = \*it1; } // SHOW str\_vect2 for(it2 = str\_vect2.begin(), i = 0; it2 != str\_vect2.end(); it2++, i++) { cout << "str\_vect2\[" << i << "\] = " << \*it2 << endl;; }
I don't understand these warnings... Compiling... DebugApp.cpp C:\KINDT\My Projects VC++\Chameleon Project\GENERIC SELDES DRIVER\DebugApp\DebugApp.cpp(87) : 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 C:\KINDT\My Projects VC++\Chameleon Project\GENERIC SELDES DRIVER\DebugApp\DebugApp.cpp(87) : warning C4786: 'std::reverse_iterator,std::allocator > *,std::basic_string, std::allocator >,std::basic_string,std::allocator > &,std::basic_string,std::allocator > *,int>' : identifier was truncated to '255' characters in the debug information c:\program files\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::vector,std::allocator >,std::allocator,std::allocator > > >::vector,std::allocator >,std::allocator,std::allocator > > >' : identifier was truncated to '255' characters in the debug information c:\program files\microsoft visual studio\vc98\include\vector(60) : warning C4786: 'std::vector,std::alloc
-
Hi all, When I compile this very simple program I get some warnings... but I don't know why? Here is this program:
int i = 0; std::vector str\_vect1; std::vector str\_vect2; std::vector::iterator it1; std::vector::iterator it2; // GET str\_vect1 str\_vect1.resize(5); for(it1 = str\_vect1.begin(), i = 0; it1 != str\_vect1.end(); it1++, i++) { cout << "str\_vect1\[" << i << "\] = "; cin >> \*it1; } // COPY str\_vect1 into str\_vect2 str\_vect2.resize(str\_vect1.size()); for(it1 = str\_vect1.begin(), it2 = str\_vect2.begin(); it1 != str\_vect1.end(); it1++, it2++) { \*it2 = \*it1; } // SHOW str\_vect2 for(it2 = str\_vect2.begin(), i = 0; it2 != str\_vect2.end(); it2++, i++) { cout << "str\_vect2\[" << i << "\] = " << \*it2 << endl;; }
I don't understand these warnings... Compiling... DebugApp.cpp C:\KINDT\My Projects VC++\Chameleon Project\GENERIC SELDES DRIVER\DebugApp\DebugApp.cpp(87) : 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 C:\KINDT\My Projects VC++\Chameleon Project\GENERIC SELDES DRIVER\DebugApp\DebugApp.cpp(87) : warning C4786: 'std::reverse_iterator,std::allocator > *,std::basic_string, std::allocator >,std::basic_string,std::allocator > &,std::basic_string,std::allocator > *,int>' : identifier was truncated to '255' characters in the debug information c:\program files\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::vector,std::allocator >,std::allocator,std::allocator > > >::vector,std::allocator >,std::allocator,std::allocator > > >' : identifier was truncated to '255' characters in the debug information c:\program files\microsoft visual studio\vc98\include\vector(60) : warning C4786: 'std::vector,std::alloc
Don't worry about it, it's a confirmed (and harmless) bug in MSVC++ 6.0. To get rid of it, insert the following line at the beginning of your
.cpp
:#pragma warning(disable:4786)
Regards, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
-
Don't worry about it, it's a confirmed (and harmless) bug in MSVC++ 6.0. To get rid of it, insert the following line at the beginning of your
.cpp
:#pragma warning(disable:4786)
Regards, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
Thanks a lot for your reply... Hello World!!! :) from Raphaël