首页 > 系统服务 > 详细

The difference between macro and function(from c and pointer )

时间:2016-05-02 13:03:17      阅读:206      评论:0      收藏:0      [点我收藏+]

macro is typeless and execute faster than funtion ,becaus of the overhead of calling and returnning of function,but macro will increase the size of program due  to many time‘s substitution,as well as the side effect of macro  may cause unexpected results,to avoid this ,you‘d better make the arguments bracketed as possible as you can,on the contrary ,the result of function is more predicted.

macro :definitine commom argument ,little funtion such as MAX,MIN,

function :specific module or operation 

The difference between macro and function(from c and pointer )

原文:http://www.cnblogs.com/zeroArn/p/5452099.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!