我想知道存储整个程序中使用的数学常量的最佳方法是什么?
#define PI 3.14159265 #define SPEEDOFLIGHT 2.99792458e8
要么
enum constants { PI = 3.14159265; SPEEDOFLIGHT = 2.99792458e8; }
谢谢
c math constants
c ×1
constants ×1
math ×1