小小的宏,妙!

#include
#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;
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章