Morgan Stanley | Columbia University | Churchill College, Cambridge

home | C++ | FAQ | technical FAQ | C++11 FAQ | publications | WG21 papers | TC++PL | Tour++ | Programming | D&E | bio | interviews | videos | applications | glossary | compilers

Errata for 8th/18th printing of The C++ Programming Language

Modified November 22, 2003

Errata for Bjarne Stroustrup: The C++ Programming Language (special edition), Addison-Wesley, 2000. ISBN0-201-70073-5. Errata for the 8th printing yielding the 9th printing. Also for the 18th printing of "The C++ Programming Language (3rd edition) yielding the 19th printing.


Errors and Clarifications


Chapter 1:

Chapter 2:

Chapter 3:

Chapter 15

pg 416: s/hash_fct,//

Chapter 17:

pg 493 corrected example:

	bitset<10> b5(string("10110111011110"),4); 	// 0111011110
	bitset<10> b6(string("10110111011110"),2,8); 	// 0011011101
Chapter 20: pg 594 s/11.3.2/10.4.10/

Chapter 21:

pg 618 better comment:

	streamsize gcount() const;	// number of char read by last unformatted input function
Chapter 22:

pg 684 In the last example, the declaration of val should be:

	typename iterator_traits<In>::value_type val = *first;	// see 19.2.2

Appendix A:

Appendix B:

Appendix C:

pg 832 s/can be represented: int, long int, unsigned long int//can be represented: int, long int/

pg 854 corrected example:

	template class X {
		// ...
		static T def_val;
		static T* new_X(T a = def_val);
	};

	template< class T> T X<T>::def_val;	// initialize to X<T>()
	template< class T> T* X<T>::new_X(T a) { /* ... */ }

	template< > int X<int>::def_val = 0;
	template< > int* X<int>::new_X(int i) { /* ... */ }

Appendix D:

Appendix E:

Morgan Stanley | Columbia University | Churchill College, Cambridge

home | C++ | FAQ | technical FAQ | C++11 FAQ | publications | WG21 papers | TC++PL | Tour++ | Programming | D&E | bio | interviews | videos | applications | glossary | compilers