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__"自定义消息")
  • 相关阅读:
    JDK6和JDK7中的substring()方法
    考试结束
    今天之总结
    暂别
    珍惜
    放弃
    我男神
    心态
    稳住,我或许能赢
    还是做好自己吧
  • 原文地址:https://www.cnblogs.com/rainbowzc/p/2920821.html
Copyright © 2011-2022 走看看