You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sources/modules/compilation-model/headers.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
## Module name: Headers
1
+
## C++ compilation model: Headers {#headers}
2
2
3
3
_Skeleton descriptions are typeset in italic text,_
4
4
_so please don't remove these descriptions when editing the topic._
@@ -38,7 +38,7 @@ The contents of header files are injected into a source file to allow
38
38
multiple distinct source files to share a single source of common
39
39
declarations.
40
40
41
-
### Foundational: Including code through standard library headers
41
+
### Foundational: Including code through standard library headers {#headers-found}
42
42
43
43
#### Background/Required Knowledge
44
44
@@ -55,13 +55,15 @@ _Max 5 items._
55
55
56
56
A student should be able to:
57
57
58
-
1.Include common standard library headers to get access to standard library features
58
+
1.include common standard library headers to get access to standard library features
59
59
60
60
#### Caveats
61
61
62
62
_This section mentions subtle points to understand, like anything resulting in
63
63
implementation-defined, unspecified, or undefined behavior._
64
64
65
+
* The include directly actually copies the header file into the file it is included in.
66
+
65
67
#### Points to cover
66
68
67
69
_This section lists important details for each point._
@@ -71,7 +73,7 @@ _This section lists important details for each point._
71
73
* Include links to reference materials for finding out what headers are used for various feature sets
72
74
* When using standard library facilities, can either use `using std::vector; vector<int> v;`, or `std::vector<int> v;`, or `using namespace std; vector<int> v;`, though modern practice strongly discourages invoking `using namespace std;`
73
75
74
-
### Main: Organizing function and class declarations for reuse
76
+
### Main: Organizing function and class declarations for reuse {#headers-main}
75
77
76
78
_Description: Write headers to support separate compilation and code organization_
77
79
@@ -86,11 +88,11 @@ _Description: Write headers to support separate compilation and code organizatio
86
88
87
89
A student should be able to:
88
90
89
-
1.Create a declaration for an existing function, placed in a separate file
90
-
2.Utilize double-quote inclusion to include a header from the same directory
91
-
3.Utilize angular-bracket inclusion to include a header from standard library
92
-
4.Explain the meaning of the one-definition rule and how it applies to headers
93
-
5.Protect a header with include guards and explain why they are necessary
91
+
1.create a declaration for an existing function, placed in a separate file
92
+
2.utilize double-quote inclusion to include a header from the same directory
93
+
3.utilize angular-bracket inclusion to include a header from standard library
94
+
4.explain the meaning of the one-definition rule and how it applies to headers
95
+
5.protect a header with include guards and explain why they are necessary
0 commit comments