Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. simple... warning in STL!! Why??

simple... warning in STL!! Why??

Scheduled Pinned Locked Moved ATL / WTL / STL
c++csharpvisual-studiographicsdebugging
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Raphael Kindt
    wrote on last edited by
    #1

    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

    J 1 Reply Last reply
    0
    • R Raphael Kindt

      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

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      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

      R 1 Reply Last reply
      0
      • J Joaquin M Lopez Munoz

        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

        R Offline
        R Offline
        Raphael Kindt
        wrote on last edited by
        #3

        Thanks a lot for your reply... Hello World!!! :) from Raphaël

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups