Skip to:Content
|
Bottom
Cover image for C++ for dummies
Title:
C++ for dummies
Personal Author:
Edition:
5th ed.
Publication Information:
Indianapolis, IN : Wiley, 2004
Physical Description:
1v + 1 CD-ROM
ISBN:
9780764568527
General Note:
Accompanied by compact disc : CP 6082

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000004995050 QA76.73.C153 D384 2004 Open Access Book Book
Searching...

On Order

Summary

Summary

If you've thought of programmers as elite intelligentsia who possess expertise (and perhaps genes) the rest of us will never have, think again. C++ For Dummies, 5th Edition , debunks the myths, blasts the barriers, shares the secrets, and gets you started. In fact, by the end of Chapter 1, you'll be able to create a C++ program. OK, it won't be newest, flashiest video game, but it might be a practical, customized inventory control or record-keeping program.

Most people catch on faster when they actually DO something, so C++ For Dummies includes a CD-ROM that gives you all you need to start programming (except the guidance in the book, of course), including:

Dev-C, a full-featured, integrated C++ compiler and editor you install to get down to business The source code for the programs in the book, including code for BUDGET, programs that demonstrate principles in the book Documentation for the Standard Template Library Online C++ help files

Written by Stephen Randy Davis, author of C++ Weekend Crash Course, C++ for Dummies, takes you through the programming process step-by-step. You'll discover how to:

Generate an executable Create source code, commenting it as you go and using consistent code indentation and naming conventions Write declarations and name variables, and calculate expressions Write and use a function, store sequences in arrays, and declare and use pointer variables Understand classes and object-oriented programming Work with constructors and destructors Use inheritance to extend classes Use stream I/O Comment your code as you go, and use consistent code indentation and naming conventions Automate programming with the Standard Template Library (STL)

C++ for Dummies 5th Edition is updated for the newest ANSI standard to make sure you're up to code.

Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file.


Author Notes

Stephen Randy Davis is a bestselling author with thirty years of programming experience


Reviews 1

Library Journal Review

C++ remains a strong contender among object-oriented programming languages (see Computer Media, LJ 6/1/03), and updated guides are always useful. C++ for Dummies assumes no previous programming experience, befitting the view of C++ as a foundational language. It includes source code, sample program, online help files, and the Dev-C++ compiler/editor on CD-ROM. Coverage ranges from how to enter, compile, and execute a program to using templates, while the "Part of Tens" sections at the end cover the most important optional features of Dev-C++ and ways to avoid adding bugs. A supplemental purchase to more thorough guides; for medium and larger libraries. Eschewing the basics, Art shows intermediate programmers the power of the language and how it applies to a range of programming tasks. Source code for sometimes extensive examples is available online. Extensive background and explanations-as well as an obvious enthusiasm for the language-make this a useful guide for those wanting to delve further. Recommended for larger libraries. (c) Copyright 2010. Library Journals LLC, a wholly owned subsidiary of Media Source, Inc. No redistribution permitted.


Table of Contents

Introductionp. 1
What's in This Bookp. 1
What's on the CDp. 2
What Is C++?p. 2
Conventions Used in This Bookp. 2
How This Book Is Organizedp. 3
And There's Morep. 4
Part 1 Introduction to C++ Programmingp. 7
Chapter 1 Writing Your First C++ Programp. 9
Grasping C++ Conceptsp. 10
Installing Dev-C++p. 12
Creating Your First C++ Programp. 16
Executing Your Programp. 20
Reviewing the Annotated Programp. 21
Calculating Expressionsp. 25
Chapter 2 Declaring Variables Constantlyp. 27
Declaring Variablesp. 27
Declaring Different Types of Variablesp. 28
Declaring Variable Typesp. 33
Are These Calculations Really Logical?p. 36
Mixed Mode Expressionsp. 36
Chapter 3 Performing Mathematical Operationsp. 39
Performing Simple Binary Arithmeticp. 40
Decomposing Expressionsp. 41
Determining the Order of Operationsp. 42
Performing Unary Operationsp. 43
Using Assignment Operatorsp. 45
Chapter 4 Performing Logical Operationsp. 47
Why Mess with Logical Operations?p. 47
Using the Simple Logical Operatorsp. 48
Expressing Binary Numbersp. 53
Performing Bitwise Logical Operationsp. 56
Chapter 5 Controlling Program Flowp. 61
Controlling Program Flow with the Branch Commandsp. 61
Executing Loops in a Programp. 63
Nesting Control Commandsp. 73
Switching to a Different Subject?p. 74
Part II Becoming a Functional C++ Programmerp. 77
Chapter 6 Creating Functionsp. 79
Writing and Using a Functionp. 79
Understanding the Details of Functionsp. 83
Overloading Function Namesp. 87
Defining Function Prototypesp. 89
Variable Storage Typesp. 91
Including Include Filesp. 91
Chapter 7 Storing Sequences in Arraysp. 93
Considering the Need for Arraysp. 93
Using Arrays of Charactersp. 100
Manipulating Strings with Characterp. 103
String-ing Along Variablesp. 106
Chapter 8 Taking a First Look at C++ Pointersp. 109
Variable Sizep. 109
What's in an Address?p. 110
Address Operatorsp. 111
Using Pointer Variablesp. 112
Passing Pointers to Functionsp. 117
Making Use of a Block of Memory Called the Heapp. 119
Chapter 9 Taking a Second Look at C++ Pointersp. 125
Defining Operations on Pointer Variablesp. 125
Declaring and Using Arrays of Pointersp. 133
Chapter 10 Debugging C++p. 139
Identifying Types of Errorsp. 139
Choosing the WRITE Technique for the Problemp. 140
Calling for the Debuggerp. 146
Part III Introduction to Classesp. 155
Chapter 11 Examining Object-Oriented Programmingp. 157
Abstracting Microwave Ovensp. 157
Classifying Microwave Ovensp. 159
Why Classify?p. 160
Chapter 12 Adding Class to C++p. 161
Introducing the Classp. 161
The Format of a Classp. 162
Accessing the Members of a Classp. 163
Chapter 13 Making Classes Workp. 167
Activating Our Objectsp. 168
Adding a Member Functionp. 169
Calling a Member Functionp. 171
Scope Resolution (And I Don't Mean How Well Your Microscope Works)p. 175
Defining a Member Function in the Classp. 177
Keeping a Member Function After Classp. 179
Overloading Member Functionsp. 181
Chapter 14 Point and Stare at Objectsp. 183
Defining Arrays of and Pointers to Simple Thingsp. 183
Declaring Arrays of Objectsp. 184
Declaring Pointers to Objectsp. 185
Passing Objects to Functionsp. 187
Why Bother with Either Pointers or References?p. 192
Returning to the Heapp. 192
Comparing Pointers to Referencesp. 193
Why Not Use References Rather Than Pointers?p. 193
Linking Up with Linked Listsp. 195
A Ray of Hope: A List of Containers Linked to the C++ Libraryp. 200
Chapter 15 Protecting Members: Do Not Disturbp. 201
Protecting Membersp. 201
Making an Argument for Using Protected Membersp. 204
Giving Non-Member Functions Access to Protected Membersp. 205
Chapter 16 "Why Do You Build Me Up, Just to Tear Me Down, Baby?"p. 209
Creating Objectsp. 209
Using Constructorsp. 210
Dissecting a Destructorp. 217
Chapter 17 Making Constructive Argumentsp. 221
Outfitting Constructors with Argumentsp. 221
Placing Too Many Demands on the Carpenter: Overloading the Constructorp. 223
Defaulting Default Constructorsp. 227
Constructing Class Membersp. 228
Constructing the Order of Constructionp. 233
Chapter 18 Copying the Copy Copy Copy Constructorp. 239
Copying an Objectp. 239
The Automatic Copy Constructorp. 242
Creating Shallow Copies versus Deep Copiesp. 244
It's a Long Way to Temporariesp. 248
Chapter 19 Static Members: Can Fabric Softener Help?p. 251
Defining a Static Memberp. 251
Declaring Static Member Functionsp. 255
What Is This About, Anyway?p. 258
Part IV Inheritancep. 259
Chapter 20 Inheriting a Classp. 261
Do I Need My Inheritance?p. 262
How Does a Class Inherit?p. 263
Having a HAS_A Relationshipp. 267
Chapter 21 Examining Virtual Member Functions: Are They for Real?p. 269
Why You Need Polymorphismp. 272
How Polymorphism Worksp. 274
When Is a Virtual Function Not?p. 276
Considering Virtual Considerationsp. 277
Chapter 22 Factoring Classesp. 279
Factoringp. 279
Implementing Abstract Classesp. 284
Factoring C++ Source Codep. 291
Part V Optional Featuresp. 303
Chapter 23 A New Assignment Operator, Should You Decide to Accept Itp. 305
Comparing Operators with Functionsp. 305
Inserting a New Operatorp. 306
Creating Shallow Copies Is a Deep Problemp. 307
Overloading the Assignment Operatorp. 308
Protecting the Escape Hatchp. 311
Chapter 24 Using Stream I/Op. 313
How Stream I/O Worksp. 313
The fstream Subclassesp. 315
Reading Directly from a Streamp. 320
What's Up with endl?p. 322
Using the strstream Subclassesp. 322
Manipulating Manipulatorsp. 325
Chapter 25 Handling Errors--Exceptionsp. 329
Justifying a New Error Mechanism?p. 331
Examining the Exception Mechanismp. 332
What Kinds of Things Can I Throw?p. 335
Chapter 26 Inheriting Multiple Inheritancep. 339
Describing the Multiple Inheritance Mechanismp. 339
Straightening Out Inheritance Ambiguitiesp. 341
Adding Virtual Inheritancep. 342
Constructing the Objects of Multiple Inheritancep. 349
Voicing a Contrary Opinionp. 349
Chapter 27 Tempting C++ Templatesp. 351
Generalizing a Function into a Templatep. 353
Template Classesp. 355
Do I Really Need Template Classes?p. 358
Tips for Using Templatesp. 361
Chapter 28 Standardizing on the Standard Template Libraryp. 363
The string Containerp. 364
The list Containersp. 366
Iteratorsp. 368
Using Mapsp. 371
Part VI The Part of Tensp. 375
Chapter 29 Ten Ways to Avoid Adding Bugs to Your Programp. 377
Enabling All Warnings and Error Messagesp. 377
Insisting on Clean Compilesp. 378
Adopting a Clear and Consistent Coding Stylep. 379
Limiting the Visibilityp. 379
Commenting Your Code While You Write Itp. 381
Single-Stepping Every Path at Least Oncep. 381
Avoid Overloading Operatorsp. 382
Heap Handlingp. 382
Using Exceptions to Handle Errorsp. 382
Avoiding Multiple Inheritancep. 383
Chapter 30 The Ten Most Important Optional Features of Dev-C++p. 385
Customize Editor Settings to Your Tastep. 385
Highlight Matching Braces/Parenthesesp. 386
Enable Exception Handlingp. 387
Include Debugging Information (Sometimes)p. 387
Create a Project Filep. 388
Customize the Help Menup. 388
Reset Breakpoints after Editing the Filep. 388
Avoid Illegal Filenamesp. 389
Include #include Files in Your Projectp. 389
Executing the Profilerp. 389
Appendix About the CDp. 393
System Requirementsp. 393
Using the CD with Microsoft Windowsp. 394
Using the CD with Linuxp. 395
What You'll Findp. 396
Development toolsp. 396
Program source codep. 397
If You've Got Problems (Of the CD Kind)p. 397
Bonus Chapters on the CD-ROM!p. CD
Bonus Chapter 1 A Functional Budget Programp. BC1
Budget1p. BC1
Budget2p. BC7
Budget3p. BC16
Budget4p. BC28
Budget5p. BC37
Bonus Chapter 2 Using Visual C++.NETp. BC45
Building a Projectp. BC45
Adding an Existing Program to an Existing Projectp. BC47
Creating a New Program Projectp. BC49
Indexp. 407
Go to:Top of Page