需要用的头文件优先放在哪里

Put as much as you can in the .c and as little as possible in the .h. The includes in the .c are only included when that one file is compiled, but the includes for the .h have to be included by every file that uses it.

尽量放在.c中,而尽量避免放到.h中.在.c中只是在编译时被included,而在.h中则是被每个使用它的文件都included了.

整理自:https://stackoverflow.com/questions/3002110/include-in-h-or-c-cpp

新战场:https://blog.csdn.net/Stephen___Qin
原文地址:https://www.cnblogs.com/Stephen-Qin/p/11604457.html