#define 的A、B和sum()函数的参数同名了,会导致sum(int A, int B)被预编译成sum(int 4, int 4),所以函数参数变成常数了。建议#define常数采用#define CONST_A 4和#define CONST_B 4。有帮助请采纳!