Starting Out with C++ teaches C++ from the ground up, and assumes no prior background in programming. In Starting Out With C++, Gaddis makes a very detailed and slow-paced presentation of both programming and C++ syntax concepts so all readers will be able to follow along. Objects are introduced after control structures, functions, arrays, and pointers, and C-style strings are used throughout. The book includes the hallmark pedagogocial features that readers of Gaddis books have come to expect.Readers who are new to programming, as well as those with prior work in other languages will find this text beneficial.
Table of Contents
Chapter 1: Introduction to Computers and Programming 1.1 Why Program? 1.2 Computer Systems: Hardware and Software 1.3 Programs and Programming Languages 1.4 What Is a Program Made of? 1.5 Input, Processing, and Output 1.6 The Programming Process 1.7 Procedural and Object-Oriented Programming Review Questions and Exercises Chapter: 2 Introduction to C++ 2.1 The Parts of a C++ Program 2.2 The cout Object 2.3 The #include Directive 2.4 Variables and Literals 2.5 Identifiers 2.6 Integer Data Type 2.7 The char Data Type 2.8 Floating-Point Data Type 2.9 The bool Data Type 2.10 Determining the Size of a Data Type 2.11 Variable Assignments and Initialization 2.12 Scope 2.13 Arithmetic Operators 2.14 Comments 2.15Focus on Software Engineering: Programming Style 2.16If You Plan to Continue in Computer Science: Standard and Prestandard C++ Review Questions and Exercises Chapter 3: Expressions and Interactivity 3.1 The cin Object 3.2 Mathematical Expressions 3.3 When You Mix Apples and Oranges: Type Conversion 3.4 Overflow and Underflow 3.5 Type Casting 3.6 Named Constants 3.7 Multiple Assignments and Combined Assignment 3.8 Formatting Output 3.9 Formatted Input 3.10Focus on Object-Oriented Programming: More About Member Functions 3.11 More Mathematical Library Functions 3.12 Introduction to File Input and Output Review Questions and Exercises Focus on Problem Solving: A Case Study (on CD) Chapter 4: Making Decisions 4.1 Relational Operators 4.2 The if Statement 4.3 Flags 4.4 Expanding the if Statement 4.5 The if/else Statement 4.6 The if/else if Statement 4.7 Using a Trailing else 4.8 Menus 4.9Focus on Software Engineering: Nested if Statements 4.10 Logical Operators 4.11 Checking Numeric Ranges with Logical Operators 4.12Focus on Software Engineering: Validating User Input 4.13 More About Variables Definitions and Scope 4.14 Comparing Strings 4.15 The Conditional Operator 4.16 The switch Statement 4.17 Testing for File Open Errors Review Questions and Exercises Focus on Problem Solving and Program Design: A Case Study (on CD) Chapter 5: Looping 5.1 The Increment and Decrement Operators 5.2 Introduction to Loops: The while loop 5.3 Counters 5.4 Letting the User Control the Loop 5.5 Keeping a Running Total 5.6 Sentinels 5.7 Using a Loop to Read Data from a File 5.8 The do-while and for Loops 5.9Focus on Software Engineering: Deciding Which Loop to Use 5.10 Nested Loops 5.11 Breaking Out of a Loop 5.12 The continue Statement 5.13Focus on Software Engineering: Using Loops for Data Validation Review Questions and Exercises Focus on Problem Solving and Program Design: A Case Study (on CD) Chapter 6: Functions 6.1Focus on Software Engineering: Modular Programming 6.2 Defining and Calling Functions 6.3 Function Prototypes 6.4 Sending Data Into a Function 6.5 Passing Data by Value 6.6Focus on Software Engineering: Using Functions in a Menu-Driven Program 6.7 The return Statement 6.8 Returning a Value from a Function 6.9 Returning a Boolean Value 6.10 Local and Global Variables 6.11 Static Local Variables 6.12 Default Arguments 6.13 Using Reference Variables as Parameters 6.14 Overloading Functions 6.15 the exit() Function 6.16 Stubs and Drivers Review Questions and Exercises Focus on Problem Solving and Program Design: A Case Study (on CD) Chapter 7: Arrays 7.1 Arrays Hold Multiple Values 7.2 Accessing Array Elements 7.3