472,993 Members | 3,183 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 software developers and data experts.

Compiler (warning C4786:)

Okay, thanks to John (THANK YOU SO MUCH). I switched all my header files
over to using the new Standard <iostream> and included the using namespace
std; . This seems to have fixed all the errors I was getting because of
mixing the old and new headers. The problem I am running into now is not an
error but 10 warnings when compiling the same class header implimentation
file that I was working with when I was having the problems with the map
class(or so I thought). I get 10 warnings of type C4786. I looked up the
warning and got this.

---------------------------------------------------------------------------
--
Compiler Warning (level 1) C4786
'identifier' : identifier was truncated to 'number' characters in the debug
information

The identifier string exceeded the maximum allowable length and was
truncated.

The debugger cannot debug code with symbols longer than 255 characters. In
the debugger, you cannot view, evaluate, update, or watch the truncated
symbols.

----------------------------------------------------------------------------
---------------

The warning is pointing here in the implimentation file (only the beginning
snippet not the full file for sake of space)
(<--*) Points to line indicated by debugger

----------------------------------------------------------------------------
---------------
// SkillList.cpp: implementation of the SkillList class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "SkillList.h"
/////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

SkillList::SkillList()
{

} (<--*)

SkillList::~SkillList()
{

}
//////////////////////////////////////////////////////////////////////
// Overloaded Operators
//////////////////////////////////////////////////////////////////////

ostream& operator<< (ostream& os, const Skill& skill)
{
os << skill.GetName() << ":\t" << skill.GetSLevel() << endl;
return os;
}
----------------------------------------------------------------------------
--------------
I can't seem to figure out why this warning is getting sent to an end brace.
The Class member function seems to be declared right and there are no other
identifiers afterwards which the debugger could be misreading. I think there
must be something being read wrong earlier as I have no identifiers nearly
as large as the max of 255. The other strange thing is that not all of the
warnings are for my code but a few point to code in a "xtree" and "utility"
file which I assume to be part of a standard header I am using. I'll list a
full warning of each type.. one that points to my code and one that points
to code in a "xtree" file.

-Warning pointing to the line indicated in implimantion file-

C:\Program Files\Microsoft Visual
Studio\MyProjects\GameProject\SkillList.cpp(16) : warning C4786:
'std::reverse_bidirectional_iterator<std::_Tree<in t,std::pair<int const
,Skill>,std::map<int,Skill,std::less<int>,std::all ocator<Skill>
::_Kfn,std::l ess<int>,std::allocator<Skill> >::iterator,std::pair<int const
,Skill>,std::pair<int const ,Skill> &,std::pair<int const ,Skill> *,int>' :
identifier was truncated to '255' characters in the debug information

-Warning pointing to a line indicated in a "xtree" file-

c:\program files\microsoft visual studio\vc98\include\xtree(174) : warning
C4786: 'std::_Tree<int,std::pair<int const
,Skill>,std::map<int,Skill,std::less<int>,std::all ocator<Skill>::_Kfn,std::less<int>,std::allocator<Skill> >::_Tree<int,std::pair <int const ,Skill>,std::map<int,Skill,std::less<int>,std::all ocator<Skill>::_Kfn,std::less<int>,std::allocator<Skill> >' : identifier was truncated

to '255' characters in the debug information
Any help at all would again be most appreciated. Thank you for your patience
with this confused youngster.

Jason

ps I've included below the interface header file which is included in the
implimentation file in the off chance that the problem may be found there;

----------------------------------------------------------------------------
---------------------------------
// SkillList.h: interface for the SkillList class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_SKILLLIST_H)
#define AFX_SKILLLIST_H

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Skill.h"
#include "String.h"

using namespace std;

// Map SkillMap defined to contain an int key and a Skill as its data
typedef map<int, Skill> SkillMap;

class SkillList
{
public:

SkillList();
virtual ~SkillList();

SkillMap GetList() const;
void SetSkillnList( Skill );
void ShowList() const;

friend ostream& operator<< (ostream& os, Skill& skill);

protected:
SkillMap itsSkillMap;

};

#endif // !defined(AFX_SKILLLIST_H)
----------------------------------------------------------------------------
------------------------------------------------
Jul 22 '05 #1
4 6289

"thule" <th***@bresnan.net> wrote in message
news:G6Tac.54277$JO3.35171@attbi_s04...
Okay, thanks to John (THANK YOU SO MUCH). I switched all my header files
over to using the new Standard <iostream> and included the using namespace
std; . This seems to have fixed all the errors I was getting because of
mixing the old and new headers. The problem I am running into now is not an
error but 10 warnings when compiling the same class header implimentation
file that I was working with when I was having the problems with the map
class(or so I thought). I get 10 warnings of type C4786. I looked up the
warning and got this.

---------------------------------------------------------------------------
--
Compiler Warning (level 1) C4786
'identifier' : identifier was truncated to 'number' characters in the debug
information


Read this -
http://www.codeguru.com/forum/showth...hreadid=232164

-Sharad
Jul 22 '05 #2
On Thu, 01 Apr 2004 11:33:58 GMT, "thule" <th***@bresnan.net> wrote:
Okay, thanks to John (THANK YOU SO MUCH). I switched all my header files
over to using the new Standard <iostream> and included the using namespace
std; . This seems to have fixed all the errors I was getting because of
mixing the old and new headers. The problem I am running into now is not an
error but 10 warnings when compiling the same class header implimentation
file that I was working with when I was having the problems with the map
class(or so I thought). I get 10 warnings of type C4786. I looked up the
warning and got this.

---------------------------------------------------------------------------


How many readers of this group have been laying odds I'd be the one to
respond to this? :-)

C4786 warnings are a long-standing VC6 problem, because they seldom
contribute useful information. There's just some internal symbol length
warning that gets triggered by expanded template type names. There's a
pragma that's supposed to work to turn them off, but there are some
ordering issues and I'm not sure I've yet seen a 100%-sure fire way to deal
with them from the compiler angle.

So consider using STLFilt, which makes them all go away automatically
(along with the trailing fragmentary messages that often follow them, or
what I refer to as their "detritus")
-leor

--
Leor Zolman --- BD Software --- www.bdsoft.com
On-Site Training in C/C++, Java, Perl and Unix
C++ users: Download BD Software's free STL Error Message Decryptor at:
www.bdsoft.com/tools/stlfilt.html
Jul 22 '05 #3
>
Read this -
http://www.codeguru.com/forum/showth...hreadid=232164

-Sharad


Well what do you know, another C++ FAQ! There's some good stuff in there, I
much prefer the style to our existing FAQ, and frankly the questions seem to
be much more frequently asked than some of the obscure topics in the
official FAQ.

Could do with some organising however, and I spotted the odd inaccuracy, but
I'll remember it for future use.

john
Jul 22 '05 #4

"John Harrison" <jo*************@hotmail.com> wrote in message
news:c4*************@ID-196037.news.uni-berlin.de...
Well what do you know, another C++ FAQ! There's some good stuff in there, I
much prefer the style to our existing FAQ, and frankly the questions seem to
be much more frequently asked than some of the obscure topics in the
official FAQ.
Yes, the FAQ is more like day to day problems which people face.
Could do with some organising however, and I spotted the odd inaccuracy, but
I'll remember it for future use.


:-)

-Sharad
Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Sony Antony | last post by:
I have the following simple program in Solaris Forte compiler 5.4 producing the warning. Though it produces the warning, it works fine as expected. This has been compiling fine without any...
1
by: rob | last post by:
Hey, I'm getting an error message (C4786) while compiling some code that contains a vector of strings "vector <string> myVector(4);" i've added "#pragma warning(disable:4786)" to the...
4
by: thule | last post by:
Okay, thanks to John (THANK YOU SO MUCH). I switched all my header files over to using the new Standard <iostream> and included the using namespace std; . This seems to have fixed all the errors I...
1
by: Hafeez | last post by:
I am having real trouble compiling this code http://www.cs.wisc.edu/~vganti/birchcode/codeHier/AttrProj.tgz The attachment shows errors when compiled using the current version of g++ in a...
5
by: Jason Heyes | last post by:
This debugger-related warning is flooding my output window. Example: c:\program files\microsoft visual studio\vc98\include\xmemory(38) : warning C4786:...
29
by: junky_fellow | last post by:
Consider the following piece of code: struct junk { int i_val; int i_val1; char c_val; }; int main(void) {
34
by: Bob | last post by:
Hi, The compiler gives Warning 96 Variable 'cmdSource' is used before it has been assigned a value. A null reference exception could result at runtime. Dim cmdSource as SQlClient.SQLDataReader...
11
by: zeppe | last post by:
Hi all, I've a problem. The code that follows creates a warning in both gcc and visual c++. However, I think it's correct: basically, there is a function that return an object of a derived...
3
by: gil | last post by:
Hi, I'm trying to find the best way to work with compiler warnings. I'd like to remove *all* warnings from the code, and playing around with the warning level, I've noticed that compiling with...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.