Commit 17c81fa1 authored by STEFF Laurent's avatar STEFF Laurent
Browse files

minor typos

parent a9b03e21
......@@ -804,7 +804,7 @@
"* Each time a header is modified, all the source files that include it directly or indirectly are recompiled. \n",
"* Each time a source file is modified, only this source file is modified; some relinking for the libraries and executables that depend on it will also occur (linking is the step that glue together the object files and libraries; the term _compilation_ is often - included in this very tutorial - abusively used to encompass both compilation and link phases).\n",
"\n",
"Thus it might seem a good idea to put as much as possible `#include` directives in the source files... hence limiting the compilation time. This is a generally very good advice... provided we do not err on the wrong side and put enough in the header file:"
"Thus it might seem a good idea to put as much as possible `#include` directives in the source files **rather than in include files**... hence limiting the compilation time. This is a generally very good advice... provided we do not err on the wrong side and put enough in the header file:"
]
},
{
......@@ -862,7 +862,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You may have noticed `string` and `iostream` are not deal with the same way... and rightly so:\n",
"You may have noticed `string` and `iostream` are not dealt with the same way... and rightly so:\n",
"\n",
"* `#include <iostream>` is only in the source file: it is actually needed only for `std::cout` and `std::endl`, which are implementation details of `Print()` function: neither appears in the signature of the function.\n",
"* `#include <string>` is present in `foo.hpp` as it is required to give the information about the type of the prototype to be used. If you do not do that, each time you include `foo.hpp` you would need to include as well `string`; doing so leads to unmaintainable code as you would have to track down all the includes that are required with each include...\n",
......@@ -914,7 +914,7 @@
"\n",
"There is actually an exception to the first rule I've just given: **forward declaration**. This is really a trick that may be used to reduce compilation time, with some caveats.\n",
"\n",
"The idea is that if a type intervenes in a header file **only as a reference and/or as a (smart) pointer**, if might be forward-declared: its type is merely given in the header.\n",
"The idea is that if a type intervenes in a header file **only as a reference and/or as a (smart) pointer**, it might be forward-declared: its type is merely given in the header.\n",
"\n"
]
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment