* remove "\r" nonsense
[mascara-docs.git] / C / the.ansi.c.programming.language / notes.accompany.ansi.c / sx7e.html
blobbcf9c234f74abaaa8ee09b06ce9ac4286ebc44e4
1 <!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
2 <!-- This collection of hypertext pages is Copyright 1995, 1996 by Steve Summit. -->
3 <!-- This material may be freely redistributed and used -->
4 <!-- but may not be republished or sold without permission. -->
5 <html>
6 <head>
7 <link rev="owner" href="mailto:scs@eskimo.com">
8 <link rev="made" href="mailto:scs@eskimo.com">
9 <title>section 4.5: Header Files</title>
10 <link href="sx7d.html" rev=precedes>
11 <link href="sx7f.html" rel=precedes>
12 <link href="sx7.html" rev=subdocument>
13 </head>
14 <body>
15 <H2>section 4.5: Header Files</H2>
17 page 82
18 <p>By the way, the ``<TT>.h</TT>'' traditionally used in header file names
19 simply stands for ``header.''
20 </p><p>We can imagine several strategies for using header files.
21 At one extreme would be to use zero header files,
22 and to repeat declarations in each file which needed them.
23 This would clearly be a poor strategy,
24 because whenever a declaration changed,
25 we would have to remember to change it in several places,
26 and it would be easy to miss one of them,
27 leading to stubborn bugs.
28 At the other extreme would be to use one header file for each source file
29 (declaring just the things defined in that source file,
30 to be <TT>#include</TT>d by files using those things),
31 but such a proliferation of header files would usually be unwieldy.
32 For small projects
33 (such as the calculator example),
34 it's a reasonable strategy
35 to use one header file for the entire project.
36 For larger projects,
37 you'll usually have several header files for sets of related declarations.
38 </p><hr>
39 <p>
40 Read sequentially:
41 <a href="sx7d.html" rev=precedes>prev</a>
42 <a href="sx7f.html" rel=precedes>next</a>
43 <a href="sx7.html" rev=subdocument>up</a>
44 <a href="top.html">top</a>
45 </p>
46 <p>
47 This page by <a href="http://www.eskimo.com/~scs/">Steve Summit</a>
48 // <a href="copyright.html">Copyright</a> 1995, 1996
49 // <a href="mailto:scs@eskimo.com">mail feedback</a>
50 </p>
51 </body>
52 </html>