c - How to write reusable functions that do logging -
i'm writing application in c. want split various functions main() calls few functions. nice if these functions reusable, application (for example add-on) use these. these functions logging doing, because main application designed interact user - add-on programs don't neccessarily have interact users, , such don't have logging.
so, programs want use of functions not depend on functions itself, on logging function. worse if program doesn't want logging. how solve this?
you this:
#ifdef logging //logging code #endif
Comments
Post a Comment