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:
over global variables:Code:#define DEFAULT_SOME_STRING "some string" #define DEFAULT_SOME_NUM_OPT 58
or there is some better way?Code:static std::string default_some_str = "some string"; static int default_some_num = 58;
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.
Thanks for help!Code:static double default_some_duble_opt = 2.3543;