Scoping recommendations while developing in C
https://softwareengineering.stackexchange.com/questions/80227
-
01-11-2019 - |
题
While developing a library using C, what are your recommendations about variable and function scoping?
In C++, OOP and namespaces made the whole thing a lot easier. But how to do that with plain C? Specially how to use the keywords static
and extern
in headers and code files to manage scoping?
没有正确的解决方案