Some kind of freaky warning

This is a discussion on Some kind of freaky warning within the C++ Programming forums, part of the General Programming Boards category; I like to keep my code with no warning, check this out. Code: Compiling... DataEngine.cpp C:\PROGRAMMING\GAMEDEVPROJECT\Core Game Build\code\DataEngine.cpp(150) : warning ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    411

    Some kind of freaky warning

    I like to keep my code with no warning, check this out.

    Code:
    Compiling...
    DataEngine.cpp
    C:\PROGRAMMING\GAMEDEVPROJECT\Core Game Build\code\DataEngine.cpp(150) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> > *,std::allocator<std::basic_string<char,std::
    char_traits<char>,std::allocator<char> > *> >::iterator,std::basic_string<char,std::char_traits<char>,std::allocator<char> > *,std::basic_string<char,std::char_traits<char>,std::allocator<char> > * &,std::basic_string<char,std::char_traits<char>,std
    ::allocator<char> > * *,int>' : identifier was truncated to '255' characters in the debug information
    C:\PROGRAMMING\GAMEDEVPROJECT\Core Game Build\code\DataEngine.cpp(150) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> > *,std::allocator<std::basic_string<char,std::
    char_traits<char>,std::allocator<char> > *> >::const_iterator,std::basic_string<char,std::char_traits<char>,std::allocator<char> > *,std::basic_string<char,std::char_traits<char>,std::allocator<char> > * const &,std::basic_string<char,std::char_trai
    ts<char>,std::allocator<char> > * const *,int>' : identifier was truncated to '255' characters in the debug information
    WindowManager.cpp
    C:\PROGRAMMING\GAMEDEVPROJECT\Core Game Build\code\DataEngine.cpp(150) : warning C4786: '__ehhandler$?FindFiles@cDataEngine@@AAEXPAV?$list@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@PAV?$basic_string@DU?$char_traits
    @D@std@@V?$allocator@D@2@@std@@@2@@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z' : identifier was truncated to '255' characters in the debug information
    C:\PROGRAMMING\GAMEDEVPROJECT\Core Game Build\code\DataEngine.cpp(150) : warning C4786: '__unwindfunclet$?FindFiles@cDataEngine@@AAEXPAV?$list@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@PAV?$basic_string@DU?$char_tr
    aits@D@std@@V?$allocator@D@2@@std@@@2@@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z$2' : identifier was truncated to '255' characters in the debug information
    C:\PROGRAMMING\GAMEDEVPROJECT\Core Game Build\code\DataEngine.cpp(150) : warning C4786: '__unwindfunclet$?FindFiles@cDataEngine@@AAEXPAV?$list@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@PAV?$basic_string@DU?$char_tr
    aits@D@std@@V?$allocator@D@2@@std@@@2@@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z$1' : identifier was truncated to '255' characters in the debug information
    C:\PROGRAMMING\GAMEDEVPROJECT\Core Game Build\code\DataEngine.cpp(150) : warning C4786: '__unwindfunclet$?FindFiles@cDataEngine@@AAEXPAV?$list@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@PAV?$basic_string@DU?$char_tr
    aits@D@std@@V?$allocator@D@2@@std@@@2@@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z$0' : identifier was truncated to '255' characters in the debug information
    RenderEngine.cpp
    Skipping... (no relevant changes detected)
    GameClient.cpp
    Linking...
    
    EndAge.exe - 0 error(s), 6 warning(s)
    It is caused by this new function I wrote...

    Code:
    void cDataEngine::FindFiles(list<string*>* filelist, string file) {
    	WIN32_FIND_DATA findData;
    
    	HANDLE h = FindFirstFile(file.data(),&findData);
    	filelist->push_front(new string(findData.cFileName));
    	
    	while(FindNextFile(h,&findData))
    		filelist->push_front(new string(findData.cFileName));
    }
    I just wanted a function that I can pass a string like "/subfolder/*.ter", and the function will return a list of all the files with that extension in that subfolder. If anyone has any better ways of doing this im open to your ideas.

    On a side note, since the list is declared dynamically, do the strings need to also be declared dynamically? So instead of making it a list of String pointers, just make it a list of strings...
    Last edited by Eber Kain; 06-10-2004 at 10:46 PM.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,505
    Typing in error messages into google can be fun!
    http://www.google.com/search?q=ident...ug+information
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    [edit]Beaten![/edit]

    It's a bug in Visual C++ 6 and earlier. This page on disabling C4786 may be helpful.

    Searching on an error message or error number is very easy and will typically get you an answer far faster and easier than posting on a forum.
    --
    As a side note, you want to use file.c_str() as file.data() may not be nul terminated.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. call to realloc() inside a function: memory problem
    By simone.marras in forum C Programming
    Replies: 15
    Last Post: 11-30-2008, 09:01 AM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. Strange gcc warning messages with derived classes
    By skewray in forum C++ Programming
    Replies: 5
    Last Post: 09-23-2007, 04:46 AM
  4. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  5. <regex.h> help needed! C slower than Java
    By bobk544 in forum C Programming
    Replies: 9
    Last Post: 02-06-2005, 05:03 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21