#define没有作用域 #include<iostream> using namespace std; void fun1() { #define PI 3.14 } void fun2() { printf("PI\n"); } int main() { fun2(); system("pause"); return 0; }