Using map

W

Weddick

I decided to try creating a map with microsoft visual C++ 6. When building
this small app I get 95 warnings which make no sense to me. Anybody else
see this before?

Thanks,

// CODE SAMPLE
#include <map>
#include <string>


int main()
{

std::map<std::string, std::string> m;

m["123"] = "Hello";


return 0;
}

// WARNINGS (Partial)

Compiling...
maptest.cpp
c:\program files\microsoft visual studio\vc98\include\xtree(118) : warning
C4786:
'std::_Tree said:
,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<cha
r> > const ,
std::basic_string said:
,std::less<std::basic_string<cha
,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocato
r said:
::_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocat
or<char> > >,std::allocator<std::basi
c_string<char,std::char_traits<char>,std::allocator<char> > > >' :
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<cha
r> >,std::pair<std::basic_string<char,std::char_traits<


which generated
 
A

Ashish kumar

in my understanding, these error messages are thrown by the compiler when
you are trying to generate
a debug version of your code or you are trying to generate a browse
information file for your code.
This is due to the restriction in either version of code to limit the length
of symbols to 255 chars.
I suppose, It doesn't make sense to anyone either. Its just to warn you.

Thanks,
Ashish
Weddick said:
I decided to try creating a map with microsoft visual C++ 6. When building
this small app I get 95 warnings which make no sense to me. Anybody else
see this before?

Thanks,

// CODE SAMPLE
#include <map>
#include <string>


int main()
{

std::map<std::string, std::string> m;

m["123"] = "Hello";


return 0;
}

// WARNINGS (Partial)

Compiling...
maptest.cpp
c:\program files\microsoft visual studio\vc98\include\xtree(118) : warning
C4786:
 

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,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top