I want to create a config object that can be used anywhere in my c program.
What would be the best practice to do so?
Currently, I have a config.h that looks like this:
#define OUTPUT 0
#define OUTPUT_DISPLAY 0
#define OUTPUT_WIDTH 1920
#define OUTPUT_HEIGHT 1080
typedef struct {
const char *output
const char *output_display;
int output_width;
int output_height;
} config_t;
Would I create a config_t instance named config or something in the header file?
Thanks