* John Carson:
* Alf P. Steinbach:
I don't think there is any justification for calling the book old, even if
it does show an occasional sign that it was not published in 2005. As for
your quoted passage, I would agree that the use of the word "can" is
unfortunate, but it is worth noting that, immediately prior to the passage
you quote (which, curiously enough, occurs in Chapter 2 of my copy), we
read:
"To smooth over these rough edges, the standard uses a format that allows
file names longer than the notorious eight characters and eliminates the
extension."
There is no suggestion that it is optional in this sentence.
There is such suggestion around that place in the text.
And it becomes worse later on, same chapter:
<quote>
if you say
#include <iostream.h>
it means
#include <iostream>
using namespace std;
</quote>
But as I wrote to the OP, most people who have used the book report
that it's great to learn from.
Although there are many more goofs similar to those above, that is,
both formally and practically incorrect, they don't matter much as
long as the student refrains from applying the information.
The big problem is, however, that many folks then go around with
incorrect "explanations", and pass those misconceptions on to others,
so that we have to straighten them out when they finally _ask_.
I also point out that he uses the extension-free form throughout
the book.
Ah, it's difficult to respond to that without it seeming like I'm
bashing the book.
I'm not.
With that in mind (I'm not out to bash the book, just countering your
implied argument that it _teaches_ standard C++), after skimming along
for the first obvious fundamentally incorrect information, I found in
chapter 5 a section named "Nested friends" where Bruce writes
<quote>
Making a structure nested doesn’t automatically give it access to
private members. To accomplish this, you must follow a particular
form: first, declare (without defining) the nested structure, then
declare it as a friend, and finally define the structure.
</quote>
where he then goes on to _exemplify_ that incorrect statement by
the incorrect code
struct Holder {
private:
int a[sz];
public:
void initialize();
struct Pointer;
friend Pointer;
struct Pointer {
// ...
};
};
Says Comeau online:
"ComeauTest.c", line 14: error: omission of "struct" is nonstandard
friend Pointer;
^
1 error detected in the compilation of "ComeauTest.c".
Removing that silly
struct Pointer;
friend Pointer;
makes the code correct (and then it also compiles... ;-)).