自定义编译输出信息

来源:互联网 发布:中国电信盒子安装软件 编辑:程序博客网 时间:2024/05/21 11:50
#include <iostream>using namespace std;// put the following code in header file or at the beginning of the source file.#define __STR2__(x) #x#define __STR1__(x) __STR2__(x)#define __LOC__ __FILE__ "("__STR1__(__LINE__)") : Warning Msg: "// output the user-define information in the source file.#pragma message(__LOC__"User-defined Information")#define _REMIND_ME0(a)#a#define _REMIND_ME1(a)__FILE__ "(" _REMIND_ME0(a) ")"#define REMIND_ME(a)message(_REMIND_ME1(__LINE__)a)#pragma  REMIND_ME("---------------这只是一个空函数,有时间实现它!---------------------")int main(){return 0;}

0 0