• Forum
  • Lounge
  • link to worst C++ books ever, examples i

 
link to worst C++ books ever, examples included

LOL check this out.
thanks god I've never buy such book.
http://www.cs.technion.ac.il/users/yechiel/CS/BadBooksC+C++.html
Ha ha, Itchy and Scratchy! Ha ha, Herbert Schildt! Nice link, thanks.
o_o

...why do these people even write books at all?
Many of the books are old and published before the first standard was out so it was probably hard to write good C++ books back then.
Many of the books are old and published before the first standard was out so it was probably hard to write good C++ books back then.

Well, I don't know about that. There should have been standard drafts they could have referred to. My personal "worst C++ book" (C++ in 21 days) was released in 1997, the same time "The C++ Programming Language" was released. And the latter is arguably still (one of) the best resources about C++ to this date.
The most funy code snippet from C++ book:

Apart from not compiling this code, you can see that the author does not care about appropriate knowledge of operator new and about exceptions.
There are more questionable issues here . . .


1
2
3
4
5
6
7
8
9
10
11
12
void binarySearchTree::insert(node* &root, nodeValue new_value)
{
  if (root == NULL)
  {
    root = new node(new_value, NULL, NULL);
    if (!root)
       throw false;
  }
  else if (root->value > new_value)
	insert(root->LChild, new_node);
  else
	insert(root->RChild, new_node);


aahhahhaahh
closed account (3hM2Nwbp)
@codekiddy

What the author forgot to show was

1
2
3
#define node (nothrow) node
#define throw return
#define false 


He also apologizes for abusing the preprocessor in this fashion.
Last edited on
did he?

I didn't see that ^^

however preprocessor is ugly.

EDIT.
author did not call delete
Last edited on
Topic archived. No new replies allowed.