did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780321387660

Starting Out with C++: Brief Version Update

by ;
  • ISBN13:

    9780321387660

  • ISBN10:

    032138766X

  • Edition: 4th
  • Format: Paperback
  • Copyright: 2006-01-01
  • Publisher: Addison Wesley
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $104.60

Summary

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

Preface v
About the Authors xvii
Contents at a Glance xix
Introduction to Computers and Programming
1(26)
Why Program?
1(1)
Computer Systems: Hardware and Software
2(4)
Programs and Programming Languages
6(6)
What Is a Program Made of?
12(4)
Input, Processing, and Output
16(1)
The Programming Process
17(4)
Procedural and Object-Oriented Programming
21(6)
Review Questions and Exercises
23(4)
Introduction to C++
27(48)
The Parts of a C++ Program
27(4)
The cout Object
31(4)
The #include Directive
35(2)
Variables and Literals
37(4)
Identifiers
41(2)
Integer Data Types
43(4)
The char Data Type
47(5)
Floating-Point Data Types
52(4)
The bool Data Type
56(1)
Determining the Size of a Data Type
57(1)
Variable Assignments and Initialization
58(1)
Scope
59(1)
Arithmetic Operators
60(4)
Comments
64(2)
Focus on Software Engineering: Programming Style
66(2)
If You Plan to Continue in Computer Science: Standard and Prestandard C++
68(7)
Review Questions and Exercises
69(6)
Expressions and Interactivity
75(70)
The cin Object
75(7)
Mathematical Expressions
82(8)
When You Mix Apples and Oranges: Type Conversion
90(2)
Overflow and Underflow
92(1)
Type Casting
93(3)
Named Constants
96(5)
Multiple Assignment and Combined Assignment
101(4)
Formatting Output
105(10)
Formatted Input
115(5)
Focus on Object-Oriented Programming: More About Member Functions
120(1)
More Mathematical Library Functions
121(4)
Introduction to File Input and Output
125(20)
Review Questions and Exercises
134(11)
Making Decisions
145(74)
Relational Operators
145(5)
The if Statement
150(7)
Flags
157(1)
Expanding the if Statement
158(3)
The if/else Statement
161(3)
The if/else if Statement
164(5)
Using a Trailing else
169(1)
Menus
170(2)
Focus on Software Engineering: Nested if Statements
172(3)
Logical Operators
175(6)
Checking Numeric Ranges with Logical Operators
181(1)
Focus on Software Engineering: Validating User Input
182(2)
More About Variable Definitions and Scope
184(5)
Comparing Strings
189(5)
The Conditional Operator
194(3)
The switch Statement
197(8)
Testing for File Open Errors
205(14)
Review Questions and Exercises
206(13)
Looping
219(44)
The Increment and Decrement Operators
219(5)
Introduction to Loops: The while Loop
224(4)
Counters
228(2)
Letting the User Control the Loop
230(1)
Keeping a Running Total
231(1)
Sentinels
232(2)
Using a Loop to Read Data from a File
234(2)
The do-while and for Loops
236(10)
Focus on Software Engineering: Deciding Which Loop to Use
246(1)
Nested Loops
246(3)
Breaking Out of a Loop
249(1)
The continue Statement
250(2)
Focus on Software Engineering: Using Loops for Data Validation
252(11)
Review Questions and Exercises
254(9)
Functions
263(62)
Focus on Software Engineering: Modular Programming
263(1)
Defining and Calling Functions
264(8)
Function Prototypes
272(2)
Sending Data into a Function
274(4)
Passing Data by Value
278(2)
Focus on Software Engineering: Using Functions in a Menu-Driven Program
280(3)
The return Statement
283(1)
Returning a Value from a Function
284(4)
Returning a Boolean Value
288(2)
Local and Global Variables
290(6)
Static Local Variables
296(3)
Default Arguments
299(4)
Using Reference Variables as Parameters
303(5)
Overloading Functions
308(4)
The exit () Function
312(3)
Stubs and Drivers
315(10)
Review Questions and Exercises
317(8)
Arrays
325(70)
Arrays Hold Multiple Values
325(2)
Accessing Array Elements
327(5)
No Bounds Checking in C++
332(2)
Array Initialization
334(5)
Processing Array Contents
339(9)
Focus on Software Engineering: Using Parallel Arrays
348(3)
Arrays as Function Arguments
351(9)
Two-dimensional Arrays
360(8)
Arrays of Strings
368(2)
Arrays with Three or More Dimensions
370(2)
If You Plan to Continue in Computer Science: Introduction to the STL vector
372(23)
Review Questions and Exercises
385(10)
Pointers
395(30)
Getting the Address of a Variable
395(2)
Pointer Variables
397(3)
The Relationship Between Arrays and Pointers
400(5)
Pointer Arithmetic
405(1)
Initializing Pointers
406(1)
Comparing Pointers
407(2)
Pointers as Function Parameters
409(5)
Focus on Software Engineering: Dynamic Memory Allocation
414(4)
Focus on Software Engineering: Returning Pointers from Functions
418(7)
Review Questions and Exercises
420(5)
Characters, Strings, and the string Class
425(42)
Character Testing
425(5)
Character Case Conversion
430(1)
Review of the Internal Storage of C-Strings
431(3)
Library Functions for Working with C-Strings
434(6)
String/Numeric Conversion Functions
440(4)
Focus on Software Engineering: Writing Your Own C-String-Handling Functions
444(6)
The C++string Class
450(17)
Review Questions and Exercises
460(7)
Structured Data
467(62)
Abstract Data Types
467(2)
Focus on Software Engineering: Combining Data into Structures
469(4)
Accessing Structure Members
473(4)
Initializing a Structure
477(3)
Arrays of Structures
480(4)
Focus on Software Engineering: Nested Structures
484(4)
Structures as Function Arguments
488(3)
Returning a Structure from a Function
491(3)
Pointers to Structures
494(4)
Focus on Software Engineering: When to Use., When to Use ->, and When to Use *
498(2)
Unions
500(5)
Enumerated Data Types
505(24)
Review Questions and Exercises
516(13)
Advanced File Operations
529(56)
File Operations
529(8)
File Output Formatting
537(3)
Passing File Stream Objects to Functions
540(2)
More Detailed Error Testing
542(3)
Member Functions for Reading and Writing Files
545(7)
Focus on Software Engineering: Working with Multiple Files
552(2)
Binary Files
554(5)
Creating Records with Structures
559(5)
Random-Access Files
564(8)
Opening a File for Both Input and Output
572(13)
Review Questions and Exercises
577(8)
Introduction to Classes
585(80)
Procedural and Object-Oriented Programming
585(5)
Introduction to Classes
590(4)
Defining an Instance of a Class
594(6)
Why Have Private Members?
600(1)
Focus on Software Engineering: Some Design Considerations
601(5)
Focus on Software Engineering: Using Private Member Functions
606(5)
Inline Member Functions
611(2)
Constructors
613(4)
Destructors
617(3)
Constructors That Accept Arguments
620(5)
Focus on Software Engineering: Input Validation Objects
625(5)
Overloading Constructors
630(2)
Only One Default Constructor and One Destructor
632(1)
Arrays of Objects
632(4)
Focus on Object-Oriented Programming: Creating an Abstract Array Data Type
636(4)
Focus on Object-Oriented Programming: Extending the Abstract Array Data Type
640(7)
If You Plan to Continue in Computer Science: An Object-Oriented System Development Primer
647(18)
Review Questions and Exercises
656(9)
More About Classes
665(72)
Instance and Static Members
665(8)
Friends of Classes
673(7)
Memberwise Assignment
680(1)
Copy Constructors
681(4)
Operator Overloading
685(34)
Object Conversion
719(7)
Object Composition
726(11)
Review Questions and Exercises
729(8)
Inheritance, Polymorphism, and Virtual Functions
737(70)
What Is Inheritance?
737(10)
Protected Members and Class Access
747(7)
Constructors and Destructors
754(7)
Redefining Base Class Functions
761(5)
Polymorphism and Virtual Member Functions
766(7)
Abstract Base Classes and Pure Virtual Functions
773(5)
Base Class Pointers
778(3)
Classes Derived from Derived Classes
781(5)
Multiple Inheritance
786(21)
Review Questions and Exercises
792(15)
Index 807
Appendix A The ASCII Character Set
Appendix B Operator Precedence and Associativity
Appendix C Introduction to Flowcharting
Appendix D Using UML in Class Design
Appendix E Namespaces
Appendix F .NET and Managed C++
Appendix G Passing Command Line Arguments
Appendix H Header File and Library Function Reference
Appendix I Binary Numbers and Bitwise Operations
Appendix J Multi-Source File Programs
Appendix K Introduction to Microsoft Visual C++ 6.0
Appendix L Introduction to Borland C++ Builder 5.0
Appendix M Introduction to Microsoft Visual C++ .NET
Appendix N Stream Member Functions for Formatting
Appendix O Linked Lists
Appendix P Recursion
Appendix Q Searching and Sorting Arrays
Appendix R Answers to Checkpoints
Appendix S Solutions to Odd Numbered Review Questions

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program