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.

9780596002589

Practical C++ Programming

by
  • ISBN13:

    9780596002589

  • ISBN10:

    0596002580

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2002-04-01
  • Publisher: Oreilly & Associates Inc
  • 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: $39.95
We're Sorry.
No Options Available at This Time.

Summary

This is a complete introduction to the C++ language for programmers who are learning the language or transitioning form C to C++. This book takes a practical, real-world approach with emphasis on coding style.

Table of Contents

Prefacep. xv
The Basics
What Is C++?p. 3
A Brief History of C++p. 3
C++ Organizationp. 4
How to Learn C++p. 6
The Basics of Program Writingp. 7
Programs from Conception to Executionp. 9
Creating a Real Programp. 10
Getting Help in Unixp. 22
Getting Help in an IDEp. 22
Stylep. 23
Commentsp. 24
C++ Codep. 28
Naming Stylep. 30
Coding Religionp. 31
Indentation and Code Formatp. 31
Clarityp. 32
Simplicityp. 33
Consistency and Organizationp. 34
Basic Declarations and Expressionsp. 35
Basic Program Structurep. 36
Simple Expressionsp. 37
The std::cout Output Objectp. 38
Variables and Storagep. 39
Variable Declarationsp. 40
Integersp. 40
Assignment Statementsp. 41
Floating-Point Numbersp. 42
Floating-Point Divide Versus Integer Dividep. 43
Charactersp. 44
Wide Charactersp. 46
Boolean Typep. 46
Arrays, Qualifiers, and Reading Numbersp. 48
Arraysp. 48
Stringsp. 49
Reading Datap. 51
Initializing Variablesp. 53
Multidimensional Arraysp. 57
C-Style Stringsp. 58
Types of Integersp. 64
Types of Floatsp. 67
Constant and Reference Declarationsp. 67
Qualifiersp. 68
Hexadecimal and Octal Constantsp. 70
Operators for Performing Shortcutsp. 71
Side Effectsp. 72
Decision and Control Statementsp. 76
if Statementp. 76
else Statementp. 77
How Not to Use std::strcmpp. 78
Looping Statementsp. 79
while Statementp. 79
break Statementp. 81
continue Statementp. 82
The Assignment Anywhere Side Effectp. 83
The Programming Processp. 87
Setting Up Your Work Areap. 89
The Specificationp. 90
Code Designp. 91
The Prototypep. 92
The Makefilep. 93
Testingp. 96
Debuggingp. 96
Maintenancep. 98
Revisionsp. 99
Electronic Archaeologyp. 99
Mark Up the Programp. 100
Use the Debuggerp. 100
Use the Text Editor as a Browserp. 100
Add Commentsp. 101
Simple Programming
More Control Statementsp. 107
for Statementp. 107
switch Statementp. 110
switch, break, and continuep. 115
Variable Scope and Functionsp. 118
Scope and Storage Classp. 118
Namespacesp. 122
Functionsp. 125
Summary of Parameter Typesp. 138
Recursionp. 139
Structured Programming Basicsp. 141
Real-World Programmingp. 142
The C++ Preprocessorp. 145
#define Statementp. 145
Conditional Compilationp. 150
#include Filesp. 152
Parameterized Macrosp. 154
Advanced Featuresp. 156
Bit Operationsp. 160
Bit Operatorsp. 161
The AND Operator (&)p. 161
Bitwise OR ( )p. 163
The Bitwise Exclusive OR ([logical and)p. 164
The Ones Complement Operator (NOT)p. 164
The Left and Right Shift Operators ([double left angle bracket], [double right angle bracket])p. 165
Setting, Clearing, and Testing Bitsp. 166
Bitmapped Graphicsp. 169
Advanced Types and Classes
Advanced Typesp. 179
Structuresp. 179
Unionsp. 181
typedefp. 184
enum Typep. 185
Bit Members or Packed Structuresp. 186
Arrays of Structuresp. 188
Simple Classesp. 191
Stacksp. 191
Improved Stackp. 195
Using a Classp. 197
Introduction to Constructors and Destructorsp. 199
Automatically Generated Member Functionsp. 204
Shortcutsp. 205
Stylep. 206
Structures Versus Classesp. 208
More on Classesp. 211
Friendsp. 211
Constant Functionsp. 213
Constant Membersp. 215
Static Member Variablesp. 216
Static Member Functionsp. 218
The Meaning of staticp. 218
Simple Pointersp. 221
const Pointersp. 226
Pointers and Printingp. 226
Pointers and Arraysp. 227
The reinterpret_castp. 234
Pointers and Structuresp. 234
Command-Line Argumentsp. 235
Advanced Programming Concepts
File Input/Outputp. 245
C++ File I/Op. 245
Conversion Routinesp. 250
Binary and ASCII Filesp. 254
The End-of-Line Puzzlep. 255
Binary I/Op. 256
Buffering Problemsp. 257
Unbuffered I/Op. 258
Designing File Formatsp. 262
C-Style I/O Routinesp. 264
C-Style Conversion Routinesp. 266
C-Style Binary I/Op. 270
C- Versus C++- Style I/Op. 272
Debugging and Optimizationp. 277
Code Reviewsp. 277
Serial Debuggingp. 280
Going Through the Outputp. 282
Interactive Debuggersp. 283
Debugging a Binary Searchp. 287
Interactive Debugging Tips and Tricksp. 298
Runtime Errorsp. 299
Optimizationp. 301
How to Optimizep. 306
Case Study: Inline Functions Versus Normal Functionsp. 308
Case Study: Optimizing a Color-Rendering Algorithmp. 308
Operator Overloadingp. 310
Creating a Simple Fixed-Point Classp. 310
Operator Functionsp. 315
Operator Member Functionsp. 324
Wartsp. 326
Full Definition of the Fixed-Point Classp. 326
Floating Pointp. 337
Floating-Point Formatp. 337
Floating Addition/Subtractionp. 338
Multiplication and Divisionp. 339
Overflow and Underflowp. 340
Roundoff Errorp. 340
Accuracyp. 341
Minimizing Roundoff Errorp. 342
Determining Accuracyp. 342
Precision and Speedp. 343
Power Seriesp. 344
Advanced Pointersp. 347
Pointers, Structures, and Classesp. 348
delete Operatorp. 350
Linked Listsp. 351
Ordered Linked Listsp. 354
Doubly Linked Listsp. 357
Treesp. 360
Printing a Treep. 364
The Rest of the Programp. 364
Data Structures for a Chess Programp. 367
Advanced Classesp. 371
Derived Classesp. 371
Virtual Functionsp. 378
Virtual Classesp. 383
Function Hiding in Derived Classesp. 385
Constructors and Destructors in Derived Classesp. 385
The dynamic_cast Operatorp. 388
Other Language Features
Exceptionsp. 393
Adding Exceptions to the Stack Classp. 394
Exceptions Versus assertp. 400
Modular Programmingp. 401
Modulesp. 401
Public and Privatep. 402
The extern Storage Classp. 402
Headersp. 404
The Body of the Modulep. 406
A Program to Use Infinite Arraysp. 406
The Makefile for Multiple Filesp. 408
Using the Infinite Arrayp. 412
Dividing a Task into Modulesp. 417
Module Design Guidelinesp. 417
Templatesp. 419
What Is a Template?p. 419
Templates: The Hard Wayp. 419
Templates: The C++ Wayp. 420
Function Specializationp. 423
Class Templatesp. 424
Class Specializationp. 426
Implementation Detailsp. 426
Advanced Featuresp. 429
Standard Template Libraryp. 432
STL Basicsp. 432
Class List--A Set of Studentsp. 434
Creating a Waiting List with the STL Listp. 436
Storing Grades in a STL Mapp. 437
Putting It All Togetherp. 437
Practical Considerations When Using the STLp. 445
Getting More Informationp. 446
Program Designp. 448
Design Goalsp. 448
Design Factorsp. 449
Design Principlesp. 450
Codingp. 451
Objectsp. 457
Real-World Design Techniquesp. 461
Putting It All Togetherp. 469
Requirementsp. 469
Code Designp. 471
Codingp. 472
Functional Descriptionp. 472
Testingp. 477
Revisionsp. 477
A Final Warningp. 477
Program Filesp. 477
From C to C++p. 497
K&R-Style Functionsp. 497
structp. 498
malloc and freep. 498
Turning Structures into Classesp. 500
setjmp and longjmpp. 501
Mixing C and C++ Codep. 503
C++'s Dustier Cornersp. 504
do/whilep. 504
gotop. 504
The?: Constructp. 506
The Comma Operatorp. 506
Overloading the () Operatorp. 507
Pointers to Membersp. 507
The asm Statementp. 508
The mutable Qualifierp. 508
Run Time Type Identificationp. 509
Trigraphsp. 509
Programming Adagesp. 510
Generalp. 510
Designp. 511
Declarationsp. 511
switch Statementp. 511
Preprocessorp. 511
Stylep. 512
Compilingp. 512
The Ten Commandments for C++ Programmersp. 512
Final Notep. 513
Appendixes
ASCII Tablep. 517
Rangesp. 519
Operator Precedence Rulesp. 521
Computing Sine Using a Power Seriesp. 523
Resourcesp. 529
Indexp. 531
Table of Contents provided by Syndetics. All Rights Reserved.

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