宏定义

#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;

}

posted @ 2021-06-29 15:42  江南王小帅  阅读(21)  评论(0)    收藏  举报