您可以使用 #define 来定义一个带有参数的宏,如下所示:
#include <iostream>
using namespace std;
#define MIN(a,b) (a<b ? a : b)
int main ()
{
int i, j;
i = 100;
j = 30;
cout <<"较小的值为:" << MIN(i, j) << endl;
return 0;
}
https://www.scsmld.com/bkzn30/ 标签:www,cout,MIN,int,参数,define From: https://www.cnblogs.com/5-si6/p/17516623.html