defining macros or static variables
Hello
I have to define default configuration settings for my application and I'm unsure which would be the best way to do this.
Do you prefer macros:
Code:
#define DEFAULT_SOME_STRING "some string"
#define DEFAULT_SOME_NUM_OPT 58
over global variables:
Code:
static std::string default_some_str = "some string";
static int default_some_num = 58;
or there is some better way?
I think the second option would be better for some reason, because if you have for instance double option, the user that would want to customize the program could clearly see that theres double/int/or some other data type required.
as:
Code:
static double default_some_duble_opt = 2.3543;
Thanks for help!