A few Hints on what to ignore
if you don't know any of these languages:
- If the book says it will teach you both C and C++
don't even take it for free.
C and C++ are two different languages.
It is fair to say that C++ was developed
on top of C's syntax,
but semantically they differ a lot
(though some basic constructs do have the same semantics).
See 2nd paragraph at alt.comp.lang.learn.c-c++ FAQ
Q#2 (temporary link).
See 2nd paragraph at alt.comp.lang.learn.c-c++ FAQ
Q#13 (temporary link).
Not convinced ? Read the first two sentences of
C++FAQ, 27.3.
In the Book Version of
C++ FAQs, it is said:
#396: How long does it take a good C
programmer to become a good C++ programmer ?
Ans.: That's the wrong goal;
instead become a good OO programmer who uses C++.
#397: How long does it take a good C
programmer to become a good OO programmer ?
Ans.: Six months to three years,
depending on your definition of good.
(Note what it does not say:
It does not depend on your knowledge in C. Y.K.)
With a slight exaggeration you can compare the relationship
between C and C++ to the relationship
between (but not the evolution of) English and French.
Though French includes all of the English alphabet,
with a few added letters and punctuation marks,
you cannot say that
"French is an extension of English", can you ?
If you already got it for free, you can always use it for
stabilizing a table, or lighting up your next girl-scout fire.
- If the book doesn't even claim that it describes
the standard language (usually referred to as ANSI-C, ANSI-C++),
you may find yourself learning a specific dialect of
a specific compiler.
As in any case of addiction, it's hard to get off the hook.
See 2nd paragraph at alt.comp.lang.learn.c-c++ FAQ
Q#13 (temporary link).
Nevertheless, if the book does claim
that it teaches the standard language, you have no way
of telling whether this claim is justified -
unless, of course, you know the language.
- Here are two examples of how to try
to identify the non standard-conforming books:
- Look for the section where the basic data types
are described (sometimes there is a table there).
Names of some basic types are
char, int, double.
It will describe their capacity (i.e, the range
of numbers they can contain). If it mentions
a definite range
(e.g, int: -32768 - +32767),
this is probably a non standard-conforming book.
The standard only gives lower bounds
for ranges, and the book should mention
that there are variations.
- Look for codes that have main() in it.
Is it void main() ?
or is it int main() ?
The standard requires int main()
and deviating good books have corrected their old
(always ill-mannered) wrong style.
(Note: This may seem a minor issue,
but it exposes the author's attitude toward
correctness and preciseness, see also
C-FAQ,11.14a
C-FAQ,11.15.)
- Does the book have an appendix that describes (via header files)
the standard library that is part of the language ?
In C, some common header files are
stdio.h, stdlib.h, math.h, ctype.h,
and some less common
are limits.h, setjump.h, locale.h.
In C++, the C headers are part of the language
(though the new standard for C++ has modified a few
definitions, and in order to make them explicit, the header
files names were modified too - e.g, math.h
becomes cmath - but they are also accessible
via their traditional C names).
As a result, some good books on C++ may not describe
the content of header files originated from C.
But they should describe header files that are special
for C++, some of which are
iostream, iomanip, complex, stack, typeinfo.
Old versions of C++ have the same file names
with a .h suffix - just as C headers
(e.g, iostream.h).
- For a C++ book, does it describe (at least the basics of)
STL (the
Standard Template Library) ?
Does it describe exception handling ?
- How rich is the Index part of the book ?
For comparison, K&R2, which is a 260 pages book,
has over a thousand (1000) entries in its index !
A few More Hints about what to look for
if you know a little about any of these languages:
- Does the book mention that the results of the
operations / and %
may vary on different computers for
negative integers ?
- Does the book mention that the results of converting
a negative floating point object
into an integral object
may vary on different computers ?
- Does the book say anything about quality programming ?
If it uses global variables, if it has
ANY function which is too long,
if most of the variables names are less than 4 letters long
and are meaningless (e.g, a, b, c1, c2, num1, num2),
then whatever it says about quality programming is meaningless.
Note, however, that the variables i, j, etc.
are considered meaningful as indices for loops,
and variable names like num, vec, etc. are meaningful
under certain circumstances.
A few More Hints on what to look for
if you know quite a bit about any of these languages.
- Examine how the book deals with data-structures.
Does it deal with them at all ?
Probably those that do will show you
how to implement a linked list.
See how the book defines the data fields
and how it defines the interface.
Does the implementation encapsulate and hide
implementation details?
Does the book teach how to correctly use
user-defined header files ?
Does the book show how to make the list an ADT
(Abstract Data Type) ?
Conclusion: This page may become redundant
if too many authors take it seriously.
If this is the case - this page will make more than it promises.
But, if it happens at all, it will take some time.
e-mail: