#### Archived

This topic is now archived and is closed to further replies.

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

This topic is 5552 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts


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]

##### Share on other sites
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 ]

##### Share on other sites
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.

##### Share on other sites
the correct warning number is 4786

so just do

#pragma warning(disable: 4786)