How can I fix the warning C4786 'identifier' : identifier wastruncated to 'number' characters in the

B

babakandme

I have a MyIOManager Object.
In this object I have a ""typedef map<_TCHAR, Command *> cmdMap""

I also have a CommandManager & Command Objects.


// MyIOManager class
....
typedef map<_TCHAR, Command *> commandMap;
....
class MyIOManager
{
....
commandMap cmdMap;
CommandManager * cmdManager;
Command * cmd
....
}

MyIOManager::StartIO()
{
....
cmd = cmdManager->CatchCommand( cmdMap );
....
}

// CommandManager class
Command * CommandManager::CatchCommand( ... )
{
....
// return a Command *...
}



But I get too many warnings like the following:
What is wrong?
How can I fix it?

I checked the MSDN Library... there is written that I should shorten
the Identifier names..., But I don't understand, I don't have at all
long name more than 255 characters...

Thanks...



d:\installingfolder\microsoft visual studio\vc98\include\xtree(200) :
warning C4786: '?rbegin@?$_Tree@DU?$pair@$$CBDPCommand@@@std@@U_Kfn@?
$map@DPCommand@@U?$less@D@std@@V?$allocator@PCommand@@@3@@2@U?
$less@D@2@V?$allocator@PCommand@@@2@@std
@@QAE?AV?$reverse_bidirectional_iterator@Viterator@?$_Tree@DU?$pair@$
$CBDPCommand@@@std@@U_Kfn@?$map@DPCommand@@U?$less@D@std@@V?
$allocator@PCommand@@@3@@2@U?$less@D@2@V?
$allocator@PCommand@@@2@@std@@U?$pair@$$CBDPCommand@@@3@AAU43@PAU43@H
@2@XZ' :


identifier was truncated to '255' characters in the browser
information



d:\installingfolder\microsoft visual studio\vc98\include
\map(46) : see reference to class template instantiation
'std::_Tree<char,struct std::pair<char const ,class Command *>,struct
std::map<char,class Command *,struct std::less<char>,class
std::allocator<class Command *> >::_Kfn,struct std::less<char>,class
std::allocator<class Command *> >' being compiled
d:\documents\myprojects\commandmanager.h(31) : see reference
to class template instantiation 'std::map<char,class Command *,struct
std::less<char>,class std::allocator<class Command *> >' being compiled
 
A

Abhishek Padmanabh

I have a MyIOManager Object.
In this object I have a ""typedef map<_TCHAR, Command *> cmdMap""

I also have a CommandManager & Command Objects.

// MyIOManager class
...
typedef map<_TCHAR, Command *> commandMap;
...
class MyIOManager
{
...
commandMap cmdMap;
CommandManager * cmdManager;
Command * cmd
...

}

MyIOManager::StartIO()
{
...
cmd = cmdManager->CatchCommand( cmdMap );
...

}

// CommandManager class
Command * CommandManager::CatchCommand( ... )
{
...
// return a Command *...

}

But I get too many warnings like the following:
What is wrong?
How can I fix it?

I checked the MSDN Library... there is written that I should shorten
the Identifier names..., But I don't understand, I don't have at all
long name more than 255 characters...

Thanks...

d:\installingfolder\microsoft visual studio\vc98\include\xtree(200) :
warning C4786: '?rbegin@?$_Tree@DU?$pair@$$CBDPCommand@@@std@@U_Kfn@?
$map@DPCommand@@U?$less@D@std@@V?$allocator@PCommand@@@3@@2@U?
$less@D@2@V?$allocator@PCommand@@@2@@std
@@QAE?AV?$reverse_bidirectional_iterator@Viterator@?$_Tree@DU?$pair@$
$CBDPCommand@@@std@@U_Kfn@?$map@DPCommand@@U?$less@D@std@@V?
$allocator@PCommand@@@3@@2@U?$less@D@2@V?
$allocator@PCommand@@@2@@std@@U?$pair@$$CBDPCommand@@@3@AAU43@PAU43@H
@2@XZ' :

identifier was truncated to '255' characters in the browser
information

d:\installingfolder\microsoft visual studio\vc98\include
\map(46) : see reference to class template instantiation
'std::_Tree<char,struct std::pair<char const ,class Command *>,struct
std::map<char,class Command *,struct std::less<char>,class
std::allocator<class Command *> >::_Kfn,struct std::less<char>,class
std::allocator<class Command *> >' being compiled
d:\documents\myprojects\commandmanager.h(31) : see reference
to class template instantiation 'std::map<char,class Command *,struct
std::less<char>,class std::allocator<class Command *> >' being compiled

You would probably only get this warning in the debug builds. You can
(almost) safely suppress this warning using the following pragma
directive:

#pragma warning(disable: 4786)
 
O

Owen Jacobson

I have a MyIOManager Object.
In this object I have a ""typedef map<_TCHAR, Command *> cmdMap""

I also have a CommandManager & Command Objects.

// MyIOManager class
...
typedef map<_TCHAR, Command *> commandMap;
...
class MyIOManager
{
...
commandMap cmdMap;
CommandManager * cmdManager;
Command * cmd
...

}

MyIOManager::StartIO()
{
...
cmd = cmdManager->CatchCommand( cmdMap );
...

}

// CommandManager class
Command * CommandManager::CatchCommand( ... )
{
...
// return a Command *...

}

But I get too many warnings like the following:
What is wrong?
How can I fix it?

I checked the MSDN Library... there is written that I should shorten
the Identifier names..., But I don't understand, I don't have at all
long name more than 255 characters...

Thanks...

d:\installingfolder\microsoft visual studio\vc98\include\xtree(200) :
warning C4786: '?rbegin@?$_Tree@DU?$pair@$$CBDPCommand@@@std@@U_Kfn@?
$map@DPCommand@@U?$less@D@std@@V?$allocator@PCommand@@@3@@2@U?
$less@D@2@V?$allocator@PCommand@@@2@@std
@@QAE?AV?$reverse_bidirectional_iterator@Viterator@?$_Tree@DU?$pair@$
$CBDPCommand@@@std@@U_Kfn@?$map@DPCommand@@U?$less@D@std@@V?
$allocator@PCommand@@@3@@2@U?$less@D@2@V?
$allocator@PCommand@@@2@@std@@U?$pair@$$CBDPCommand@@@3@AAU43@PAU43@H
@2@XZ' :

identifier was truncated to '255' characters in the browser
information

d:\installingfolder\microsoft visual studio\vc98\include
\map(46) : see reference to class template instantiation
'std::_Tree<char,struct std::pair<char const ,class Command *>,struct
std::map<char,class Command *,struct std::less<char>,class
std::allocator<class Command *> >::_Kfn,struct std::less<char>,class
std::allocator<class Command *> >' being compiled
d:\documents\myprojects\commandmanager.h(31) : see reference
to class template instantiation 'std::map<char,class Command *,struct
std::less<char>,class std::allocator<class Command *> >' being compiled

Upgrade to a modern compiler. VC6 is almost ten years old and was
written before the current C++ standard. Later versions of the same
compiler have no problem with the symbols generated by template
expansion.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top