What methods are there to modularize C code?
问题 What methods, practices and conventions do you know of to modularize C code as a project grows in size? 回答1: Create header files which contain ONLY what is necessary to use a module. In the corresponding .c file(s), make anything not meant to be visible outside (e.g. helper functions) static. Use prefixes on the names of everything externally visible to help avoid namespace collisions. (If a module spans multiple files, things become harder., as you may need to expose internal things and not