Click here to Skip to main content
16,010,650 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralVB Add-In Programming Pin
Jamie Nordmeyer23-Apr-01 10:53
Jamie Nordmeyer23-Apr-01 10:53 
Generalbook on ado via vc Pin
23-Apr-01 9:28
suss23-Apr-01 9:28 
GeneralRe: book on ado via vc Pin
23-Apr-01 10:15
suss23-Apr-01 10:15 
GeneralRe: book on ado via vc Pin
Brendan Tregear23-Apr-01 16:43
Brendan Tregear23-Apr-01 16:43 
GeneralSetWaitableTimer Pin
Joe O'Connor23-Apr-01 8:09
Joe O'Connor23-Apr-01 8:09 
GeneralAccess Violation Pin
23-Apr-01 6:57
suss23-Apr-01 6:57 
GeneralRe: Access Violation Pin
Tim Deveaux23-Apr-01 7:45
Tim Deveaux23-Apr-01 7:45 
GeneralSTL map warning messages Pin
Arun Saha23-Apr-01 5:27
Arun Saha23-Apr-01 5:27 
I wrote the following code in my app. It works fine but a bunch of warning messages
are bugging the hell out of me. All the books that I consulted declare map like this.
Any help to get rid of these obnoxious warnings is much appreciated. Thanks.

class Product
{
........
}

int main()
{
Product Pen("Pen", 5.99, 58);
Product Lamp("Lamp", 28.49, 24);
Product Speaker("Speaker", 24.95, 40);

map<std::string, product=""> productMap;

productMap[Pen.getName()] = Pen;
productMap[Lamp.getName()] = Lamp;
productMap[Speaker.getName()] = Speaker;
return 0;
}

The WARNING messages
--------------------
c:\program files\microsoft visual studio\vc98\include\xtree(118) : warning C4786: 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,
Product>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Product,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<product> >::_Kfn,std::less<std::basic_string<char,std::cha
r_traits<char>,std::allocator<char> > >,std::allocator<product> >' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\map(46) : see reference to class template instantiation 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<
char>,std::allocator<char> > const ,Product>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Product,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<product> >::_Kfn,std::
less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<product> >' being compiled
C:\C++ Practice\map\map14.cpp(50) : see reference to class template instantiation 'std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Product,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<c
har> > >,std::allocator<product> >' being compiledMad | :mad:
GeneralRe: STL map warning messages Pin
Michael Dunn23-Apr-01 5:37
sitebuilderMichael Dunn23-Apr-01 5:37 
GeneralRe: STL map warning messages Pin
AHa23-Apr-01 6:50
AHa23-Apr-01 6:50 
GeneralRe: STL map warning messages Pin
Michael Dunn23-Apr-01 15:53
sitebuilderMichael Dunn23-Apr-01 15:53 
GeneralDLL as a statically linked LIB file Pin
#realJSOP23-Apr-01 5:22
professional#realJSOP23-Apr-01 5:22 
GeneralRe: DLL as a statically linked LIB file Pin
Chris Meech23-Apr-01 5:42
Chris Meech23-Apr-01 5:42 
GeneralRe: DLL as a statically linked LIB file Pin
#realJSOP23-Apr-01 8:24
professional#realJSOP23-Apr-01 8:24 
QuestionHow to unbind a network protocol? Pin
23-Apr-01 5:02
suss23-Apr-01 5:02 
GeneralScreen Capture Pin
jerry0davis23-Apr-01 2:03
jerry0davis23-Apr-01 2:03 
GeneralRe: Screen Capture Pin
l a u r e n23-Apr-01 7:52
l a u r e n23-Apr-01 7:52 
GeneralRe: Screen Capture Pin
Peter Pearson23-Apr-01 9:29
Peter Pearson23-Apr-01 9:29 
GeneralRe: Screen Capture Pin
23-Apr-01 10:57
suss23-Apr-01 10:57 
GeneralRe: Screen Capture Pin
l a u r e n23-Apr-01 11:24
l a u r e n23-Apr-01 11:24 
QuestionForms in VC++? Pin
Ton van den Heuvel23-Apr-01 0:34
Ton van den Heuvel23-Apr-01 0:34 
AnswerRe: Forms in VC++? Pin
Michael Dunn23-Apr-01 5:40
sitebuilderMichael Dunn23-Apr-01 5:40 
AnswerRe: Forms in VC++? Pin
23-Apr-01 6:25
suss23-Apr-01 6:25 
QuestionHow to Use keyboard in dialog box Pin
22-Apr-01 23:45
suss22-Apr-01 23:45 
AnswerRe: How to Use keyboard in dialog box Pin
Bernhard23-Apr-01 1:28
Bernhard23-Apr-01 1:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.