How to use the #pragma message to generate user-defined warning messages in Visual C++ (155196)
The information in this article applies to:
- Microsoft Visual C++ 1.0
- Microsoft Visual C++ 1.5
- Microsoft Visual C++ 1.51
- Microsoft Visual C++ 1.52
- Microsoft Visual C++ 2.0
- Microsoft Visual C++ 2.1
- Microsoft Visual C++ 2.2
- Microsoft Visual C++ 4.0
- Microsoft Visual C++ 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q155196 SUMMARY In some instances, you may find it advantageous to have the
compiler generate user-defined warning messages such as the following: collisions.cpp(1) : Warning Msg: Need to do 3-D
collision checking When such a warning is generated by the compiler
and displayed in the Developer Studio's Output window, you can double-click on
the warning message to get to the line of code with the message. REFERENCES For additional information concerning the #pragma message
directive, see the Visual C++ Help file; Search on: "message (pragma
directive)."
For additional information concerning the __FILE__ and
__LINE__ predefined macros, see the Visual C++ Help file; Search on:
"predefined macros," Topic: "Preprocessor Reference," and click on "ANSI."
Modification Type: | Major | Last Reviewed: | 6/2/2005 |
---|
Keywords: | kberrmsg kbinfo kbhowto kbide kbLangC KB155196 kbAudDeveloper |
---|
|