zoukankan      html  css  js  c++  java
  • vc中自定义编译时的输出消息 .

    VC中可以自定义编译输出消息

    #pragma message("Insert User-defined Information here!")

    但是这样没有文件和行数信息,不能定位。

    使用如下方式可以定位:

    1 // put the following code in header file or at the beginning of the source file.
    2 #define __STR2__(x) #x
    3 #define __STR1__(x) __STR2__(x)
    4 #define __LOC__ __FILE__ "("__STR1__(__LINE__)") : Warning Msg: "
    5 
    6 // output the user-define information in the source file.
    7 #pragma message(__LOC__"自定义消息")
  • 相关阅读:
    06
    05
    继承
    0713作业
    0712作业
    0711作业
    福彩双色球作业
    0709作业
    选择语句+循环语句作业
    0706作业
  • 原文地址:https://www.cnblogs.com/rainbowzc/p/2920821.html
Copyright © 2011-2022 走看看