PREFACE vii Arrays and strings:Chapter 7,Sections 8.1 and 8.2 of Chapter 8 Classes and namespaces:Chapter 10,Sections 11.1 and 11.2 of Chapter 11, and Chapter 12.This material covers defining classes,friends,overloaded operators,and namespaces. Pointers and dynamic arrays:Chapter 9 Arrays in classes:Sections 11.3 and 11.4 of Chapter 11 Inheritance:Chapter 15 Recursion:Chapter 14.(Alternately,recursion may be moved to later in the course.) Vectors:Chapter 8.3 Pointers and linked lists:Chapter 13 Any subset of the following chapters may also be used: Exception handling:Chapter 16 Templates:Chapter 17 Standard Template Library:Chapter 18 Accessibility to Students It is not enough for a book to present the right topics in the right order.It is not even enough for it to be clear and correct when read by an instructor or other experienced programmer.The material needs to be presented in a way that is accessible to beginning students.In this introductory textbook,I have endeav- ored to write in a way that students find clear and friendly.Reports from the many students who have used the earlier editions of this book confirm that this style makes the material clear and often even enjoyable to students. ANSI/ISO C++Standard This edition is fully compatible with compilers that meet the latest ANSI/ISO C++standard.At the time of this writing the latest standard is C++11. Advanced Topics Many "advanced topics"are becoming part of a standard CS1 course.Even if they are not part of a course,it is good to have them available in the text as enrichment material.This book offers a number of advanced topics that can be integrated into a course or left as enrichment topics.It gives thorough cov- erage of C++templates,inheritance (including virtual functions),exception handling,and the STL(Standard Template Library).Although this book uses libraries and teaches students the importance of libraries,it does not require any nonstandard libraries.This book uses only libraries that are provided with essentially all C++implementations.Preface vii Arrays and strings: Chapter 7, Sections 8.1 and 8.2 of Chapter 8 Classes and namespaces: Chapter 10, Sections 11.1 and 11.2 of Chapter 11, and Chapter 12. This material covers defining classes, friends, overloaded operators, and namespaces. Pointers and dynamic arrays: Chapter 9 Arrays in classes: Sections 11.3 and 11.4 of Chapter 11 Inheritance: Chapter 15 Recursion: Chapter 14. (Alternately, recursion may be moved to later in the course.) Vectors: Chapter 8.3 Pointers and linked lists: Chapter 13 Any subset of the following chapters may also be used: Exception handling: Chapter 16 Templates: Chapter 17 Standard Template Library: Chapter 18 Accessibility to Students It is not enough for a book to present the right topics in the right order. It is not even enough for it to be clear and correct when read by an instructor or other experienced programmer. The material needs to be presented in a way that is accessible to beginning students. In this introductory textbook, I have endeavored to write in a way that students find clear and friendly. Reports from the many students who have used the earlier editions of this book confirm that this style makes the material clear and often even enjoyable to students. ANSI/ISO C++ Standard This edition is fully compatible with compilers that meet the latest ANSI/ISO C++ standard. At the time of this writing the latest standard is C++11. Advanced Topics Many “advanced topics” are becoming part of a standard CS1 course. Even if they are not part of a course, it is good to have them available in the text as enrichment material. This book offers a number of advanced topics that can be integrated into a course or left as enrichment topics. It gives thorough coverage of C++ templates, inheritance (including virtual functions), exception handling, and the STL (Standard Template Library). Although this book uses libraries and teaches students the importance of libraries, it does not require any nonstandard libraries. This book uses only libraries that are provided with essentially all C++ implementations