Skip to content
Advertisement

Tag: global-variables

Global variables in header only library

I’m writing a header-only logger library and I need global variables to store current logger settings (output flags, log file descriptor etc.). My thoughts: I can’t declare variables as extern, as i don’t have access to the translation units to define them I can’t just define global variables in header as it will lead to multiple definitions static variables in

Advertisement