Questions tagged [include]
The include tag has no summary.
21 questions
3 votes
3 answers
212 views
Should I ensure my libfoo library's include file can be included as foo/foo.h?
I'm maintaining a small C library; let's call it libfoo. It has quite a few users (actually it's complicated - it's the main fork of a highly popular library which has been abandoned); and it sports a ...
1 vote
1 answer
2k views
UML Use Case Diagrams Relationship - Required / Optional AND independent
I am learning to create Use Case diagrams using the UML specification, but I have a couple of doubts about Use Case relationships which I cannot solve on my own. My question regards two different ...
4 votes
2 answers
6k views
Include own header file first or last? Any technical reasons?
I was revisiting my question How can I prevent header hell?, when I noticed a comment which said A good technique for ensuring a header is independent is having a rule that the source file always ...
0 votes
1 answer
727 views
UML, <<extending>> and <<including>> from the same use case
This is a use case diagram about the enrollment of students at a university. There are several flaws in it, and I have to find them. I am wondering what is happening when you get to use case "Choose ...
53 votes
7 answers
38k views
How can I prevent header hell?
We are starting a new project, from scratch. About eight developers, a dozen or so subsystems, each with four or five source files. What can we do to prevent “header hell”, AKA “spaghetti headers”? ...
2 votes
2 answers
250 views
Fully Specifying #includes
I'm very fastidious about code. When I remove functionality from a file I remove the cooresponding #includes. I've hit several errors where I would remove a #include from a header, and another file ...
1 vote
1 answer
1k views
When should I use a precondition and when to include another use-case to provide those conditions?
For example, suppose 'Borrwoing a book' a use case: I can figure out two description for it: Description one: Precondition: The member to access this use-case should be already logged in. OR EVEN ...
23 votes
7 answers
56k views
Why do we need to include the .h while everything works when including only the .cpp file?
Why do we need to include both the .h and .cpp files while we can make it work solely by including the .cpp file? For example: creating a file.h containing declarations, then creating a file.cpp ...