`
butnet
  • 浏览: 84960 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

小小的宏,妙!

 
阅读更多
#include <iostream>
#include <conio.h>
using namespace std;
#define DEBUG
#ifdef DEBUG
     #define TEST(X) cout<<#X"="<<X<<endl
#else
     #define TEST(X)
#endif

int main()
{
    int a=10,b=21;
    char cs[]="fdasfdasf";
    TEST(a);
    TEST(b);
    TEST(cs);
    getch();
    return 0;
}

相关推荐

Global site tag (gtag.js) - Google Analytics