Question:
Using even the most basic default constructor, such as ” mapm; ” , causes a debug error creating huge compiler warnings in Visual C++ and MS Visual Studio 6.0. That one line alone causes 6 warnings and the small sample program below ultimately creates a total of 19 warnings. The code executes without further incident but the unresolved warnings trouble me. In essence, the compiler warnings indicate that the debugger continues to append class names into long command lines that eventually exceed the 255-character limitation. The suggested resolution, substituting a 1-character name for the class name during debug time, does not work. Is there a fix?
#include #include #include
Answer:
You shouldn’t pick very short names for your identifiers, this isn’t the cause of your problem, and therefore, it will not hush these warnings. These warnings result from a debugger shortcoming, which will be fixed in the next Visual C++ release, hopefully. As always, use meaningful names for identifiers.
This warning message occurs frequently when using templates, and STL containers in particular. Essentially, it says that the debugger cannot display the symbolic names of the functions in the template classes because they exceed the 255 character limit. You can safely ignore this warning. When you build a release version of your app, these warnings will disappear.