first ,I'am chinese . my english is poor. But I am in the linux . 

the marco use to list :

1. replace the const number called magic number

2. like C++ inline funciton,for example:

#define IS_LEAR_YEAR(y)     y % 4 == 0 && y % 100 != 0 || y % 400 == 0

3.uses to debug

#define DBGprint(...)     printf("DEBUG:%s", __VA_ARGS__)

4. uses the # and ##

the # uses like add "

## example:

  #define Command##x  the result is Command_x

about the macro , I just remember about this,just for me , and I wish that I could give the help to other.

if  everyone not clear , could leave message.I will try my best to help other.maybe little  help you.

posted on 2011-10-23 20:45  zengco2009  阅读(202)  评论(0编辑  收藏  举报