Ash*_*ppa 8 preprocessor directive messages visual-c++
有没有办法在编译期间显示的代码中嵌入消息,当编译该代码时?消息本质上是诊断性的,不应修改或中止编译过程.
(免责声明:我知道这个问题的答案.我没有在Stack Overflow上找到它,我认为这对知识库来说是一个有用的补充.)
这是一种方法:
#pragma message("Your Message Here")
Run Code Online (Sandbox Code Playgroud)
https://msdn.microsoft.com/en-us/library/x7dkzch2.aspx