Kindly explain these warnings

N

Naren

Hello All,
I dont get errors but I get warnings though the code runs fine.
Could anyone help me removing these warnings

c:\program files\microsoft visual studio\vc98\include\vector(48) : warning
C4786:
'??0?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V
?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2
@@std@@QAE@IABV
?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@ABV?$allocator@V?$
basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@1@@Z' :
identifier was truncated to '255' characters in the browser information
z:\hexmod17\src\cvariantinfo.h(15) : see reference to class template
instantiation 'std::vector<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class
std::allocator<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > > >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(61) : warning
C4786:
'??0?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V
?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2
@@std@@QAE@PBV?
$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@0ABV?$allocator@V?$
basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@1@@Z' :
identifier was truncated to '255' characters in the browser information
z:\hexmod17\src\cvariantinfo.h(15) : see reference to class template
instantiation 'std::vector<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class
std::allocator<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > > >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(103) : warning
C4786:
'?rbegin@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@s
td@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@st
d@@@2@@std@@QA
E?AV?$reverse_iterator@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator
@D@2@@std@@V12@AAV12@PAV12@H@2@XZ' : identifier was truncated to '255'
characters in the browser information
z:\hexmod17\src\cvariantinfo.h(15) : see reference to class template
instantiation 'std::vector<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class
std::allocator<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > > >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(105) : warning
C4786:
'?rbegin@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@s
td@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@st
d@@@2@@std@@QB
E?AV?$reverse_iterator@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator
@D@2@@std@@V12@ABV12@PBV12@H@2@XZ' : identifier was truncated to '255'
characters in the browser information
z:\hexmod17\src\cvariantinfo.h(15) : see reference to class template
instantiation 'std::vector<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class
std::allocator<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > > >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(107) : warning
C4786:
'?rend@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std
@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@
@@2@@std@@QAE?
AV?$reverse_iterator@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D
@2@@std@@V12@AAV12@PAV12@H@2@XZ' : identifier was truncated to '255'
characters in the browser information
z:\hexmod17\src\cvariantinfo.h(15) : see reference to class template
instantiation 'std::vector<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class
std::allocator<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > > >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(108) : warning
C4786:
'?rend@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std
@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@
@@2@@std@@QBE?
AV?$reverse_iterator@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D
@2@@std@@V12@ABV12@PBV12@H@2@XZ' : identifier was truncated to '255'
characters in the browser information
z:\hexmod17\src\cvariantinfo.h(15) : see reference to class template
instantiation 'std::vector<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class
std::allocator<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > > >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(114) : warning
C4786:
'std::reverse_iterator<std::basic_string<char,std::char_traits<char>,std::al
locator said:
,std::basic_string<char,std::char_traits<char>,std::allocator<char> >
const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> >
const *,int>' : identifier was truncated to '255' characters in the debug
information
c:\program files\microsoft visual studio\vc98\include\vector(114) :
while compiling class-template member function 'unsigned int __thiscall
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<cha
r> >,std::allocator<std::
basic_string said:
::size(void) const'
c:\program files\microsoft visual studio\vc98\include\vector(114) : warning
C4786:
'std::reverse_iterator<std::basic_string<char,std::char_traits<char>,std::al
locator<char> >
*,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:\program files\microsoft visual studio\vc98\include\vector(114) :
while compiling class-template member function 'unsigned int __thiscall
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<cha
r> >,std::allocator<std::
basic_string said:
::size(void) const'


CVctrInfoBlk.obj - 0 error(s), 8 warning(s)

I have compiled in MS VC 6.0 compiler.

Here is header file cvariantinfo.h and the warning occurs exactly at the
line where is declare a static vector<string>

#ifndef CVARIANTINFO_H
#define CVARIANTINFO_H

#include <vector>
#include <string>

class CVariantInfo
{
public:
static vector<uint32> m_VDSVctrEntries;
static vector<uint32> m_VDSBlkLength;
static vector<uint32> m_VDSIndex;
static vector<string> m_VDSFileName; //warning occurs here
static uint32 m_ulBlkLength;
};

#endif

Thanks in advance.

Regards,
Naren.
 
D

David Fisher

Naren said:
Could anyone help me removing these warnings
c:\program files\microsoft visual studio\vc98\include\vector(48) : warning
C4786: [...snip...]
identifier was truncated to '255' characters in the browser information

Template expansions produce some very long names - not a real problem
though. You can get rid of the warning with:

#pragma warning(disable:4786)

BTW with Visual C++ you can click on an error message and press F1 to get
more information about it ...

David F
 
C

Chris Theis

Naren said:
Hello All,
I dont get errors but I get warnings though the code runs fine.
Could anyone help me removing these warnings

c:\program files\microsoft visual studio\vc98\include\vector(48) : warning
C4786: [SNIP]

Thanks in advance.

Regards,
Naren.

There is nothing you need to worry about. This is just an VC++ feature in
the debug version, telling you that the internal symbols reached the limit
of 255 characters and thus are truncated for the browse-information
database. To turn this annoying stuff off you will have to resort to a
#pragma statement. I don't know the exact syntax by heart but it should be
something like

#pragma warning off (C4786)

Please, check your manual for the correct syntax!!

Regards
Chris
 

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

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top