What is the best way to define constants in a C++ header file? Currently I am using the following format.
constant.H
//Define constants
#define Grids 70
#define Hori_L 10.0
#define delta_x Hori_L/(Grids - 1)
#define P0 101325 //N/(m^2)
#define T0 300 //kg/(m^3)
#define P1 0.9395*P0
#define T1 0.9823*T0 //K
#define rho1 P1/(R*T1) //kg/(m^
#define rho0 rho1/(0.9564)
This some times gives me strange errors as i have to put (delta_x) around them when in use
ie
Q_predicted = Q - delta_t/(delta_x)*delta_X(F, 1) + delta_t*HH;
Shuo