正在加载图片...
2.带参数的宏定义 般形式: # define宏名(参数表)字符串 如:# define area(x,y)x米 total=AREA (3. 6) tota1=3米6 area=AREA (3*3, 7/2) area=3*3*7/2; 如:# define p(a,b)a*b area=P(3+4,5+6); area=3+4*5+6;2. 带参数的宏定义 一般形式: #define 宏名(参数表) 字符串 如: #define AREA(x,y) x*y … total=AREA(3,6); area=AREA(3*3,7/2); … total=3*6; area=3*3*7/2; 如: #define P(a,b) a*b … area= P(3+4,5+6); area=3+4*5+6;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有