宏定义
#include <iostream>
define PI 3.1416
using namespace std;
int main()
{
int i = 100;
if 1
cout << "i = " << i << endl;
endif
ifdef PI
cout << "1 PI =" << PI << endl;
endif
ifdef PI
cout << "2 PI =" << PI << endl;
endif
return 0;
}

浙公网安备 33010602011771号