What happens when you use constants without brackets? What error messages do you get?
If only the third one is the problem:
Code:
#define delta_x Hori_L*pow((Grids - 1), -1) //m
Then you need to remove the comment from it because it may cause problems like this:
Code:
#define Grids 70
#define Hori_L 1.0
#define delta_x Hori_L*pow((Grids - 1), -1) //m
int main(int argc, char **argv) {
printf("%d\n", delta_x);
return 0;
}
will become this after preprocessing:
Code:
#define Grids 70
#define Hori_L 1.0
#define delta_x Hori_L*pow((Grids - 1), -1) //m
int main(int argc, char **argv) {
printf("%d\n", Hori_L*pow((Grids - 1), -1) //m);
/*notice that the end of the statement gets cut off*/
return 0;
}
and you should have brackets around that anyway, so that the order of operations doesn't get messed up
it should look like this:
Code:
#define delta_x (Hori_L*pow((Grids - 1), -1))