c - The best strategy with headers and function prototypes -
am relatively new in c, , need finish myself big c-project.. define style. trying figure out best strategy have deal headers , function prototypes. had been looking info.. seems blurry.
so asks. improve approach in experience in big c-projects?
have 1 big header function prototypes, , include there prototype when add together function + may be, separate header construction declaration + *.c files structures implementation similar function grouped.
have separate header(foo.h) file prototypes , structures declarations each *.c file (foo.c)
to seek minimise prototypes usage using 1 huge *.c file , move relative each other functions avoid prototypes @ when it possible?
the sec selection typical, , considered best.
in theory breaking things modules makes compilation faster, since don't need re-build code hasn't changed, can link against existing object files.
in practice linking might not bottleneck, it's nice conceptually break code modules based on does. big soup of in kitchen isn't tasty.
c
No comments:
Post a Comment