声明使用M_PI的默认方法为: 在stdafx.h头文件中声明. #define _USE_MATH_DEFINES #include <math.h> 转载于:https://www.cnblogs.com/JackieWu/p/4341596.html