469,138 Members | 1,383 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,138 developers. It's quick & easy.

Using map

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<std::basic_string<char,std::char_trait s<char>,std::allocator<cha
r>
,std::pair<std::basic_string<char,std::char_trait s<char>,std::allocator<cha r> > const ,
std::basic_string<char,std::char_traits<char>,std: :allocator<char> >,std::map<std::basic_string<char,std::char_traits <char>,std::allocator<char
,std::basic_string<char,std::char_traits<char>,st d::allocator<char>,std::less<std::basic_string<cha

r,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_ traits<char>,std::allocato r<char> > >::_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::allocato r<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_trait s<char>,std::allocator<cha
r> >,std::pair<std::basic_string<char,std::char_trait s<
char>,std::allocator<char> > const
,std::basic_string<char,std::char_traits<char>,std ::allocator<char> >,std::map<std::basic_string<char,std::char_traits <char>,std::allocator<char
,std::basic_string<char,std::char_traits<char>,st d::allocator<cha

which generated
Jul 22 '05 #1
2 2074
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" <we*****@comcast.net> wrote in message
news:QDSvc.42210$eY2.15628@attbi_s02...
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<std::basic_string<char,std::char_trait s<char>,std::allocator<cha r>

,std::pair<std::basic_string<char,std::char_trait s<char>,std::allocator<cha
r> > const ,
std::basic_string<char,std::char_traits<char>,std: :allocator<char> >

,std::map<std::basic_string<char,std::char_traits <char>,std::allocator<char
,std::basic_string<char,std::char_traits<char>,st d::allocator<char>,std::less<std::basic_string<cha

r,std::char_traits<char>,std::allocator<char> >

,std::allocator<std::basic_string<char,std::char_ traits<char>,std::allocato
r<char> > >

::_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::allocato r<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_trait s<char>,std::allocator<cha r> >,std::pair<std::basic_string<char,std::char_trait s<
char>,std::allocator<char> > const
,std::basic_string<char,std::char_traits<char>,std ::allocator<char> >

,std::map<std::basic_string<char,std::char_traits <char>,std::allocator<char
,std::basic_string<char,std::char_traits<char>,st d::allocator<cha

which generated

Jul 22 '05 #2
Ashish kumar wrote:
I suppose, It doesn't make sense to anyone either. Its just to warn you.

Weddick wrote:

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

'std::_Tree<std::basic_string<char,std::char_trait s<char>,std::allocator<cha
r>


Always use http://groups.google.com to search such error messages before
posting them. You will quickly find the #pragma required to get rid of the
silly warning.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Enos Meroka | last post: by
3 posts views Thread by Mike L | last post: by
3 posts views Thread by xzzy | last post: by
14 posts views Thread by pmud | last post: by
8 posts views Thread by acb | last post: by
reply views Thread by Metal2You | last post: by
reply views Thread by Eugene Anthony | last post: by
6 posts views Thread by =?Utf-8?B?U2hhd24gU2VzbmE=?= | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.