CodePudding user response:
Not necessarily, if the header files may be introduced by multiple source files, so can't define a global variable in the header files, on the other hand, no problem ~CodePudding user response:
Don't recommend the use of global variables, if want to use, be sure to add the staticCodePudding user response:
Global variable declaration and definition still together! This view and facilitate calls,