Preface xvii
CHAPTER 1 Introduction to Computers and Programming 1
CHAPTER 2 Introduction to C++ 27
CHAPTER 3 Expressions and Interactivity 87
CHAPTER 4 Making Decisions 153
CHAPTER 5 Loops and Files 237
CHAPTER 6 Functions 309
CHAPTER 7 Arrays and Vectors 387
CHAPTER 8 Searching and Sorting Arrays 471
CHAPTER 9 Pointers 511
CHAPTER 10 Characters, C-Strings, and More about the string Class 565
CHAPTER 11 Structured Data 621
CHAPTER 12 Advanced File Operations 675
CHAPTER 13 Introduction to Classes 751
CHAPTER 14 More about Classes 849
CHAPTER 15 Inheritance, Polymorphism, and Virtual Functions 941
CHAPTER 16 Exceptions and Templates 1023
CHAPTER 17 The Standard Template Library 1065
CHAPTER 18 Linked Lists 1169
CHAPTER 19 Stacks and Queues 1213
CHAPTER 20 Recursion 1271
CHAPTER 21 Binary Trees 1309
Appendix A: The ASCII Character Set 1339
Appendix B: Operator Precedence and Associativity 1341
Quick References 1343
Index 1345
Credit 1363
Online The following appendices are available at www.pearsonhighered.com/cs-resources.
Appendix C: Introduction to Flowcharting
Appendix D: Using UML in Class Design
Appendix E: Namespaces
Appendix F: Passing Command Line Arguments
Appendix G: Binary Numbers and Bitwise Operations
Appendix H: STL Algorithms
Appendix I: Multi-Source File Programs
Appendix J: Stream Member Functions for Formatting
Appendix K: Unions
Appendix L: Answers to Checkpoints
Appendix M: Answers to Odd Numbered Review Questions
Case Study 1: C-String Manipulation
Case Study 2: High Adventure Travel Agency—Part 1
Case Study 3: Loan Amortization
Case Study 4: Creating a String Class
Case Study 5: High Adventure Travel Agency—Part 2
Case Study 6: High Adventure Travel Agency—Part 3
Case Study 7: Intersection of Sets
Case Study 8: Sales Commission
Starting Out with C++: From Control Structures through Objects presents C++ programming concepts and techniques in clear, easy-to-understand language. Using his hallmark accessible, step-by-step approach, author Tony Gaddis covers control structures, functions, arrays, and pointers before objects and classes. Every chapter includes clear and easy-to-read code listings, concise and practical real-world examples, focused explanations, and an abundance of exercises. The 10th Edition includes improvements and updates to reflect the latest modern C++ language features, including tuples, lambdas, and new syntactic constructs such as the if statement with initialization.