Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



It's a technique, but not so applicable to say "you should" do it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: