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 1Introduction to Computers and Programming 1.1Why Program? 1.2Computer Systems: Hardware and Software 1.3Programs and Programming Languages 1.4What Is a Program Made of? 1.5Input, Processing, and Output 1.6The Programming Process 1.7Procedural and Object-Oriented Programming Review Questions and Exercises Serendipity Booksellers Software Development Project-Part 1 CHAPTER 2Introduction to C++ 2.1The Parts of a C++ Program 2.2The cout Object 2.3The #include Directive 2.4Variables and Literals 2.5Identifiers 2.6Integer Data Types 2.7The char Data Type 2.8Floating-Point Data Types 2.9The bool Data Type 2.10Determining the Size of a Data Type 2.11Variable Assignments and Initialization 2.12Scope 2.13Arithmetic Operators 2.14Comments 2.15Focus on Software Engineering:Programming Style 2.16If You Plan to Continue in Computer Science:Standard and Prestandard C++ Review Questions and Exercises Serendipity Booksellers Software Development Project-Part 2 CHAPTER 3Expressions and Interactivity 3.1The cin Object 3.2Mathematical Expressions 3.3When You Mix Apples and Oranges:Type Conversion 3.4Overflow and Underflow 3.5Type Casting 3.6Named Constants 3.7Multiple Assignment and Combined Assignment 3.8Formatting Output 3.9Formatted Input 3.10Focus on Object-Oriented Programming:More About Member Functions 3.11More Mathematical Library Functions 3.12Focus on Debugging:Hand Tracing a Program 3.13Focus on Problem Solving: A Case Study 3.14Introduction to File Input and Output Review Questions and Exercises Serendipity Booksellers Software Development Project-Part 3 CHAPTER 4Making Decisions 4.1Relational Operators 4.2The if Statement 4.3Flags 4.4Expanding the if Statement 4.5The if/else Statement 4.6The if/else if Statement 4.7Using a Trailing else 4.8Menus 4.9Focus on Software Engineering:Nestedif Statements 4.10Logical Operators 4.11Checking Numeric Ranges with Logical Operators 4.12Focus on Software Engineering:Validating User Input 4.13More About Variable Definitions and Scope 4.14Comparing Strings 4.15The Conditional Operator 4.16The switch Statement 4.17Testing for File Open Errors 4.18Focus on Problem Solving and Program Design:A Case Study Review Questions and Exercises Serendipity Booksellers Software Development Project-Part 4 CHAPTER 5Looping 5.1The Increment and Decrement Operators 5.2Introduction to Loops: The while Loop 5.3Counters 5.4Letting the User Control the Loop 5.5Keeping a Running Total 5.6Sentinels 5.7Using a Loop to Read Data from a File 5.8The do-while and for Loops 5.9Focus on Software Engineering:Deciding Which Loop to Use 5.10Nested Loops 5.11Breaking Out of a Loop 5.12The continue Statement 5.13Focus on Software Engineering:Using Loops for Data Validation 5.14Focus on Problem Solving and Program Design: A Case Study Review Questions and Excercises Serendipity Booksellers Software Development Project-Part 5 CHAPTER 6Functions 6.1Focus on Software Engineering:Modular Programming 6.2Defining and Calling Functions 6.3