c++次日

宏的缺陷和內聯函數: 因爲宏會直接對調用的位置進行替換,所以會引出一系列問題java #define ADD(x,y) x+y #define COMPARE(a,b) ((a)<(b))?(a):(b) int main(){ int res = ADD(1,2) * 3; //結果是7,1 + 2 * 3 = 7 int a=10,b=20; int res2 = COMPARE(+
相關文章
相關標籤/搜索