3 ms·
In app.h, you should forward-declare "typedef struct bintree_t bintree;" Then, in each source file that #includes "app.h" and also CALLS binary-tree-related f
by palish 16y ago
In app.h, you should forward-declare "typedef struct bintree_t bintree;"
Then, in each source file that #includes "app.h" and also CALLS binary-tree-related functions, you #include "bintree.h".
Like I said, this is more of a concern in C++ where compile times are way, way slower than C. And in C++, it's very much worth it to forward declare in header files. It makes a big difference once your source code base has grown to epic proportions.
- frou_dh 16y agoIt's a technique, but not so applicable to say "you should" do it.