   Weird warning messages    
  I'm trying to do something like this where I return a list of strings (in this case, I'm using a vector)  vector<string> getStrings (){   vector<string> strings;   // fill strings some how   return strings;}// somewhere else in the codevector<string> st = getStrings(); // this is where    // main.cpp(112) is  // located    It will compile, but I get these 10 warnings:quote:vector(48):warning C4786: '??0?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE@IABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@ABV?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@1@@Z' :identifier was truncated to '255' characters in the browser informationmain.cpp(112):see reference to class template instantiation 'std::vector,class std::allocator >,classstd::allocator,class std::allocator > > >'being compiledvector(61):warning C4786: '??0?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@0ABV?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@1@@Z' :identifier was truncated to '255' characters in thebrowser informationmain.cpp(112):see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >'being compiledvector(103):warning C4786: '?rbegin@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE?AV?$reverse_iterator@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@AAV12@PAV12@H@2@XZ' : identifier was truncated to '255' characters in the browser informationmain.cpp(112):see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiledvector(105):warning C4786: '?rbegin@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QBE?AV?$reverse_iterator@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@ABV12@PBV12@H@2@XZ' : identifier was truncated to '255' characters in the browser informationmain.cpp(112):see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiledvector(107):warning C4786: '?rend@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE?AV?$reverse_iterator@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@AAV12@PAV12@H@2@XZ' : identifier was truncated to '255' characters in the browser informationmain.cpp(112):see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiledvector(108):warning C4786: '?rend@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QBE?AV?$reverse_iterator@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@ABV12@PBV12@H@2@XZ' : identifier was truncated to '255' characters in the browser informationmain.cpp(112):see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiledmain.cpp(119):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 informationmain.cpp(119):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 informationvector(60):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 informationLinking...    There are two separate warning messages I'm getting:identifier was truncated to '255' characters in the debug informationsee reference to class template instantiation 'some ugly thing listed here' being compiled    The first warning looks obnoxious, but harmless and will probably go away if I change to the release profile.  But the second one is what concerns me.  Is it a problem?  There is some reason it is warning me about that.  Also, does the source above look like the best way to do that?  Perhaps there is a better way that won't get me all these warning messages.  Thanks for your help.edit: fixed formatting[edited by - spiffgq on November 21, 2002 11:58:22 AM]
  #pragma warning(disable:4786)  ;  This warning is due to the fact that when operating with templated functions and classes the compiler generates internal identifiers with different type-names than you specify (among other things, in order to differentiate between different templated versions of the functions and classes).Due to Visual Studio being particularily inept it actually generates identifiers longer than it is capable of handling, and that''s what the warning says.That long string with @''s and $''s and such is the internal representation, and Visual Studio complains that this identifier is longer than 255 characters (which is what it can handle), even though it generated those identifiers on it''s own.You can safely ignore those warnings (especially as there is nothing you can do to stop VS from generating those identifiers). To tell VS that you''re not interested in these particular warnings, do #pragma warning(disable:4786)  before you include the string and vector headers.-Neophyte  ;  void printSarcasticMessage () {    printf ("Visual Studios just keeps impressing me more and more each day I use it");}  Thanks for your help.  