阅读背景:

第二十五章补充内容 6 用宏函数来输出表达式的值

来源:互联网 
// 第二十五章补充内容 6 用宏函数来输出表达式的值
/*#define DEBUG
#include <iostream>
using namespace std;
#ifndef DEBUG
#define show(x)
#else
#define show(x)\
	cout<<#x<<": \t"<<x<<endl;
#endif
int main()
{
	int x = 9;
	show(x); //9

	int *y = &x;
	show(*y); //9
	show(y);  //内存地址
	char *ch="hello world";
	show(ch); //字符串
    return 0;
}*/
// 第二十五章补充内容 6 用宏函数来输出表达式的值
/*#define DEBUG



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: