back

Errata and Improvements

They may be more glitches than listed here, also in the printed code. However, all known typos and bugs had been corrected in the electronic edition and the downloadable sample programs.

pp 56, 75, 84, sample programs: insert #include<iostream>
pp 92, 219, sample programs: insert using namespace std;
p 12, 5th line from the bottom: replace fromWhere != end() by fromWhere.current != 0. (or by fromWhere != iterator())
p 33, line 12: replace Input_iterator& by InputIterator_type&
p 37, 13th from the bottom: replace 'stream end operator' by  'stream end iterator'
p 50, replace the 6th to 3rd line from the bottom by
template<class T> bool operator==(const Container<T>&x, const Container<T>& y);
template<class T> bool operator<(const Container<T>&x, const Container<T>& y);
p 53,  line 10: replace size_t i = intV.begin(); by I = intV.begin();
p 57, Table 3.7: Of course, in contrast to the text on p. 56, the complexity of merge(), remove(), remove_if(), and splice() is O(n).
p 59, 6th line from the bottom: replace ostream& by std::ostream&
p 62, sample program: move using namespace std; before the first template
p 67, line 10-14: The order of evaluation is not from left to right, because unary operators are right-associative. operator++(int) is evaluated first.
        line 14 from the bottom: const Container::value_type& should better be Container::const_reference
p 70, 12th line from the bottom. Please insert a clarifying comment after line // .... is now 7
   /*   In contrast to the front_insert_iterator, the insert position remains the same, i.e. after insertion, the position is not  any more the beginning of the vector. */
p 94, 2nd line from the bottom, and p 95, 14thline from the bottom: insert template parameter BinaryPredicate
p 98, 1st line of para 5.3.6:   replace 'add to the number n'  by 'counts'
p 117, below middle: vector<double> should be vector<int>
p 119, 11th line: remove redundant cast char()
p 126, sample program: insert #include<functional>
p 163, 14th line from the bottom: replace fib.end() by fib.end()-1 in order not to write beyond the end of the container.
p 236, middle: replace Input.close() by Inputfile.close()
p 284, top: add operator!=() or, if your compiler supports this, insert using namespace std::rel_ops; in the middle of p 282


"There is always one more bug." (Murphy). If you find an error, please write to:
mailadresses

last updated 22nd Feb 2000