I have this hw problem. This is an example of one of the seven I need. Am I declaring the double symbolic constant right? "The program should use at least seven symbolic constants. They should be:
a double that represents the per check fee for fewer than 20 checks (0.10)."
This is what I have for this particular question. The second is obviously a different fee. I just want to make sure I'm starting this out right before I start typing the entire code I need.
Yes that is correct syntax. If you want your constant doubles to be true globals, declare them right above main, and I would preferably write the names using capslock, just so you know they're constant variables, and not function prototypes.
No, I am familiar with macros. I don't like macros because if you're defining a function as such, depending on the compiler, they might do weird and undesirable things with order of operations. So I usually have something like
And yes, although you can do quite powerful things with the preprocessor, I must agree with you that macro-laden code can be truly horrible to both read & debug.