Whether this approach to the C partition application into modules?
Please tell me, is it right to do so. And if not, how?
For example, there is an app with the main code in the app.c.
He has the header app.h.
Next, I want to make a large knotted piece of functionality in a module file.c, with its module.h.
Then I have:
- app.h included module.h
- module.h nothing included
- module.c included app.h
The header files are located define and declarations of the entities and signatures of functions.
Right to do so? What if I want to take away module.* in another project, I have hands to rewrite include?
Thanks in advance. asked March 23rd 20 at 19:38 1 answer
It depends on what task.
Perhaps there is no problem.
You may be able to pull out common functionality in the defines.h.
You might be able somehow to break the cycle. For example, in OOP this can be done through the interface.
Find more questions by tags