Kari said:
I have written a computer programming book that uses C++.
The book is for beginners in the field of computer programming,
[SNIP]
Hi again,
Running a looong ZIPping and looking at your example book pages in the
meanwhile. I will put my little suggestions here, some might be silly,
others more silly.
Page 12: you talk about "output stream" but does not really say what is a
stream. Unless you want the readers to wonder about what is a stream
instead of concentrating on the text I suggest that you include there some
sort of short description the concept. A really short one, just to give an
rough idea, maybe with a picture.
Page 13, example program, ballon: "Pairs of braces {} are used to delimit
the program statements in C++." This is simply not true. Braces are used
to *group* the statements and the semicolon is used to delimit them!
Page 15 example program. It is not a C++ issue, rather a usability issue.
The given program writes: Please type in an integer and when I did type in
one, I have pressed the enter it asks again the *same*. This confuses users
the best. "But I just did give you an integer!" I suggest to change the
second printout to something a bit different.
Same page: the description of the main function is confusing. It tries to
discuss functions *and* the restriction on main to return int at the same
time, and ends up suggesting that "In most of our programs, we will have a
function named main() whose type is int." While this is A OK, it does not
say that its type is *always* int. One might understand it as: we might
have a main or might not and it might have the type int or might not.
According to the standard language it must have the type int.
Well, that's all for today. I hope it helps.