Home > Back-end >  Do not use global variables in c language?
Do not use global variables in c language?

Time:12-23

Transplant a C language engineering project, technical director, said all the code can not use global variables, under normal circumstances, a C file module, using internal type of global variables, how to meet the requirements?

CodePudding user response:

The static modifier of global variables is limited in this document,

CodePudding user response:

Preach, or by function returns is worth to define an interface function, for example, used to capture module within the global variable or a static global variable;
  • Related