106 warnings... but not in my code :)

Started by
2 comments, last by BB-Pest 21 years, 4 months ago

    
	inline bool operator ==(const Item& rhs)const {return true;};

	
	int getNeededAmount(std::string UseString)
	{
		//return effectMap[UseString]->getNeededAmount();

		return 0;
	}
	UseEffect getEffect(std::string UseString)
	{
		//return effectMap[UseString];

		return UseEffect();
	}
	
protected:
	//contains the effects resolved when using this item in relation the the used use command (-> UseString)

	std::map<std::string ,UseEffect> effectMap;
    
this is a snippet of my code... and i get 106 warnings in several classes is i compile it (map and xtree). what have i done wrong? [edit1] most of the warnings contain something about reducing the debug information to 255 chars [edited by - BB-Pest on December 7, 2002 8:00:02 AM]
---- sig coming soon
Advertisement
quote:Original post by BB-Pest
most of the warnings contain something about reducing the debug information to 255 chars


That''s just a stupid VS debugger limitation - the type information gets truncated. Nothing to worry about. Disable the warning with the appropriate #pragma.

Check the compiler''s help page for that warning.

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
when you use templates, the standard library in particular, the names of classes and object types can get quite long. the vc++ debugger only has room for names of length 256, so it''s just letting you know that it''s cutting the name short.

it''s nothing to worry about (which is partly why it''s only a warning, although warnings should always be taken seriously).

check your documents but you need to put #pragma warning(disable: ...) where .. is the code number of the warning message you''re getting. that will suppress it. (it''s something like 4076 but i can''t remember off the top of my head).

put the pragma somewhere before the include files which contain the templates causing the warning message.
the correct warning number is 4786

so just do

#pragma warning(disable: 4786)
I'm learning, just like the best of us...Ok, now assume a spherical cow... :)

This topic is closed to new replies.

Advertisement