View Single Post
Old 03-11-2005, 12:21 PM   #20
Nikson
Game Wizzard

 
Join Date: Oct 2005
Location: Cairns, Australia
Posts: 260
Default

Comments on your book:

It's aimed at someone who knows nothing about C++ programming, and yet you don't explain what an IDE is (or at least what the acronym stands for). You give two examples of compilers but no instructions on how to set them up.
A sentence like "if you dont know how to compile, read the compiler manual" does not belong in a tutorial book. This is meant to be a manual, so explain every step.
"Include <iostream> includes the input-output stream". Great. Now if newbies only knew what a stream is. You don't include a stream, you include a header file.
As for the namespace, since you don't explain its purpose, you shouldn't have it in there in the first place. (#include <iostream.h> is better than # include <iostream> and using namespace std
"return 0; note: this can only be used within the main function". Wrong. Any function declared as non-void must return something. This is redundant, as is the fact that you made your main() an int. It should have been void in this simplest of examples, saving you the requirement to explain return calls (which you didn't do). A return doesn't end a program, but only the current function. If said function happens to be main (and it's a simple program), then it will indeed finish and exit the program with the argument zero (i.e: exit(0) ).
Your reference mentions assigning values to- and printing variables, but not how to declare or initialize them.
"cin.ignore() - must be used after cin, discards the enter key from input". Must be used? Most text-oriented algorithms make good use of the /n character, removing it from a string is generally a bad idea.
You make brief, passing mentions of arrays, without due explanation.

Anyone who sees C++ for the first time and reads this, will walk away with more questions than answers.
Nikson is offline                         Send a private message to Nikson
Reply With Quote