Home   FAQs   New Arrivals   Specials   Pricing & Shipping   Location   Corporate Services   Why Choose Bookware?  
 Search:   
Call our store: 9955 5567 (from within Sydney) or 1800 734 567 (from outside Sydney)
 View Cart   Check Out   
 
Browse by Subject
 TAFE Accounting
 TAFE I.T./Computing
 TAFE - Other
I.T
 .NET
 Windows 8
 Adobe CS6
 Cisco
 CCNA 2012
 CCNP 2012
 Java
 VB
 ASP
 Web Design
 E-Commerce
 Project Management
 ITIL
 Macintosh
 Mobile Devices
 Linux
 Windows Server 2012
 SQL Server 2012
 SAP
Certification
 MCITP
 MCTS
Economics and Business
 Accounting
 Business Information Systems
 Economics
 Finance
 Management
 Marketing
 TAX
 Human Resources
Academic
 Law
 Nursing
 Medical
 Psychology
 Engineering

C++ Primer Plus (5th Edition) *(Front cover torn, pages still in tact.)

by: Stephen Prata

Notify me when in stock

On-line Price: $41.95 (includes GST)

Paperback package 1224

35%Off Retail Price

You save: $23.00

This book is reduced

because it is not new, worn, marked, etc ... and may be missing front or back cover . Limited stock.

We

will confirm with you if you're happy to continue with the book in this condition. Only order if you are ok with this.
________

Retail Price: $64.95

Publisher: SAMS,15.11.04

Category: C++ PROGRAMMING Level: B/I/A

ISBN: 0672326973
ISBN13: 9780672326974

Add to Shopping Cart

Features and Benefits

Update to a computer industry classic; over 100,000 copies sold in previous editions.


  * Contains over 20 new programming exercises and newly improved examples.


  * Suitable as a tutorial or as the core text for C++ programming courses.


  * Teaches fundamentals of programming including principles of structured code and top-down design.


  * Includes a handy tear-out 'Quick Reference Card'.

Author Bio

Stephen Prata teaches astronomy, physics, and computer science at the College of Marin in Kentfield, California. He received his B.S. from the California Institute of Technology and his Ph.D. from the University of California, Berkeley. Stephen has authored or coauthored more than a dozen books for The Waite Group. He wrote The Waite Group's New C Primer Plus, which received the Computer Press Association's 1990 Best How-to Computer Book Award, and The Waite Group's C++ Primer Plus, nominated for the Computer Press Association's Best How-to Computer Book Award in 1991.

Table of Contents

Introduction.

1. Getting Started.


  Learning C++: What Lies Before You.


  The Origins of C++: A Little History.


      The C Language.


      C Programming Philosophy.


      The C++ Shift: Object-Oriented Programming.


      C++ and Generic Programming.


      The Genesis of C++.


  Portability and Standards.


  The Mechanics of Creating a Program.


      Creating the Source Code File.


      Compilation and Linking.


  Summary.

2. Setting Out to C++.


  C++ Initiation.


      The main() Function.


      C++ Comments.


      The C++ Preprocessor and the iostream File.


      Header Filenames.


      Namespaces.


      C++ Output with cout.


      C++ Source Code Formatting.


  C++ Statements.


      Declaration Statements and Variables.


      Assignment Statements.


      A New Trick for cout.


  More C++ Statements.


        Using cin.


      Concatenating with cout.


      cin and cout: A Touch of Class.


  Functions.


      Using a Function That Has a Return Value.


      Function Variations.


      User-Defined Functions.


      Using a User-Defined Function That Has a Return Value.


      Placing the using Directive in Multifunction Programs.


  Summary.


  Review Questions.


  Programming Exercises.

3. Dealing with Data.


  Simple Variables.


      Names for Variables.


      Integer Types.


      The short, int, and long Integer Types.


      Unsigned Types.


      Choosing an Integer Type.


      Integer Constants.


      How C++ Decides What Type a Constant Is.


      The char Type: Characters and Small Integers.


      The bool Type.


  The const Qualifier.


  Floating-Point Numbers.


      Writing Floating-Point Numbers.


      Floating-Point Types.


      Floating-Point Constants.


      Advantages and Disadvantages of Floating-Point Numbers.


  C++ Arithmetic Operators.


      Order of Operation: Operator Precedence and Associativity.


      Division Diversions.


      The Modulus Operator.


      Type Conversions.


  Summary.


  Review Questions.


  Programming Exercises.

4. Compound Types.


  Introducing Arrays.


      Program Notes.


      Initialization Rules for Arrays.


  Strings.


      Concatenating String Constants.


      Using Strings in an Array.


      Adventures in String Input.


      Reading String Input a Line at a Time.


      Mixing String and Numeric Input.


  Introducing the string Class.


      Assignment, Concatenation, and Appending.


      More string Class Operations.


      More on string Class I/O.


  Introducing Structures.


      Using a Structure in a Program.


      Can a Structure Use a string Class Member?


      Other Structure Properties.


      Arrays of Structures.


      Bit Fields in Structures.


  Unions.


  Enumerations.


      Setting Enumerator Values.


      Value Ranges for Enumerations.


  Pointers and the Free Store.


      Declaring and Initializing Pointers.


      Pointer Danger.


      Pointers and Numbers.


      Allocating Memory with new.


      Freeing Memory with delete.


      Using new to Create Dynamic Arrays.


  Pointers, Arrays, and Pointer Arithmetic.


      Program Notes.


      Pointers and Strings.


      Using new to Create Dynamic Structures.


      Automatic Storage, Static Storage, and Dynamic Storage.


  Summary.


  Review Questions.


  Programming Exercises.

5. Loops and Relational Expressions.


  Introducing for Loops.


      for Loop Parts.


      Back to the for Loop.


      Changing the Step Size.


      Inside Strings with the for Loop.


      The Increment (++) and Decrement (--) Operators.


      Side Effects and Sequence Points.


      Prefixing Versus Postfixing.


      The Increment/Decrement Operators and Pointers.


      Combination Assignment Operators.


      Compound Statements, or Blocks.


      The Comma Operator (or More Syntax Tricks).


  Relational Expressions.


      A Mistake You'll Probably Make.


      Comparing C-Style Strings.


      Comparing string Class Strings.


  The while Loop.


      Program Notes.


      for Versus while.


      Just a Moment-Building a Time-Delay Loop.


  The do while Loop.


  Loops and Text Input.


      Using Unadorned cin for Input.


      cin.get(char) to the Rescue.


      Which cin.get()?


      The End-of-File Condition.


      Yet Another Version of cin.get().


  Nested Loops and Two-Dimensional Arrays.


      Initializing a Two-Dimensional Array.


  Summary.


  Review Questions.


    Programming Exercises.

6. Branching Statements and Logical Operators.


  The if Statement.


      The if else Statement.


      Formatting if else Statements.


      The if else if else Construction.


  Logical Expressions.


      The Logical OR Operator: ||


      The Logical AND Operator: &&


      The Logical NOT Operator: !


      Logical Operator Facts.


      Alternative Representations.


  The cctype Library of Character Functions.


  The ?: Operator.


  The switch Statement.


      Using Enumerators as Labels.


      switch and if else.


  The break and continue Statements.


      Program Notes.


  Number-Reading Loops.


      Program Notes.


  Simple File Input/Output.


      Text I/O and Text Files.


      Writing to a Text File.


        Reading from a Text File.


  Summary.


  Review Questions.


  Programming Exercises.

7. Functions: C++'s Programming Modules.


  Function Review.


      Defining a Function.


      Prototyping and Calling a Function.


  Function Arguments and Passing by Value.


      Multiple Arguments.


      Another Two-Argument Function.


  Functions and Arrays.


      How Pointers Enable Array-Processing Functions.


      The Implications of Using Arrays as Arguments.


      More Array Function Examples.


      Functions Using Array Ranges.


      Pointers and const.


  Functions and Two-Dimensional Arrays.


  Functions and C-Style Strings.


      Functions with C-Style String Arguments.


      Functions That Return C-Style Strings.


  Functions and Structures.


      Passing and Returning Structures.


      Another Example of Using Functions with Structures.


      Passing Structure Addresses.


  Functions and string Class Objects.


  Recursion.


      Recursion with a Single Recursive Call.


      Recursion with Multiple Recursive Calls.


  Pointers to Functions.


      Function Pointer Basics.


      A Function Pointer Example.


  Summary.


  Review Questions.


  Programming Exercises.

8. Adventures in Functions.


  C++ Inline Functions.


  Reference Variables.


        Creating a Reference Variable.


      References as Function Parameters.


      Reference Properties and Oddities.


      Using References with a Structure.


      Using References with a Class Object.


      Another Object Lesson: Objects, Inheritance, and References.


      When to Use Reference Arguments.


  Default Arguments.


      Program Notes.


  Function Overloading.


      An Overloading Example.


      When to Use Function Overloading.


  Function Templates.


      Overloaded Templates.


      Explicit Specializations.


      Instantiations and Specializations.


      Which Function Version Does the Compiler Pick?


  Summary.


  Review Questions.


  Programming Exercises.

9. Memory Models and Namespaces.


  Separate Compilation.


  Storage Duration, Scope, and Linkage.


      Scope and Linkage.


      Automatic Storage Duration.


      Static Duration Variables.


      Specifiers and Qualifiers.


      Functions and Linkage.


      Language Linking.


      Storage Schemes and Dynamic Allocation.


  The Placement new Operator.


      Program Notes.


  Namespaces.


      Traditional C++ Namespaces.


      New Namespace Features.


      A Namespace Example.


      Namespaces and the Future.


  Summary.


  Review Questions.


  Programming Exercises.

10. Objects and Classes.


  Procedural and Object-Oriented Programming.


  Abstraction and Classes.


      What Is a Type?


      Classes in C++.


      Implementing Class Member Functions.


      Using Classes.


      Reviewing Our Story to Date.


  Class Constructors and Destructors.


      Declaring and Defining Constructors.


      Using Constructors.


      Default Constructors.


      Destructors.


      Improving the Stock Class.


      Constructors and Destructors in Review.


  Knowing Your Objects: The this Pointer.


  An Array of Objects.


  The Interface and Implementation Revisited.


  Class Scope.


      Class Scope Constants.


  Abstract Data Types.


  Summary.


  Review Questions.


  Programming Exercises.

11. Working with Classes.


  Operator Overloading.


  Time on Our Hands: Developing an Operator Overloading Example.


      Adding an Addition Operator.


      Overloading Restrictions.


      More Overloaded Operators.


  Introducing Friends.


      Creating Friends.


      A Common Kind of Friend: Overloading the << Operator.


  Overloaded Operators: Member Versus Nonmember Functions.


  More Overloading: A Vector Class.


      Using a State Member.


      Overloading Arithmetic Operators for the Vector Class.


      An Implementation Comment.


      Taking the Vector Class on a Random Walk.


  Automatic Conversions and Type Casts for Classes.


      Program Notes.


      Conversion Functions.


      Conversions and Friends.


  Summary.


  Review Questions.


  Programming Exercises.

12. Classes and Dynamic Memory Allocation.


  Dynamic Memory and Classes.


      A Review Example and Static Class Members.


      Implicit Member Functions.


      The New, Improved String Class.


      Things to Remember When Using new in Constructors.


      Observations About Returning Objects.


      Using Pointers to Objects.


      Reviewing Techniques.


  A Queue Simulation.


      A Queue Class.


      The Customer Class.


      The Simulation.


  Summary.


  Review Questions.


  Programming Exercises.

13. Class Inheritance.


  Beginning with a Simple Base Class.


      Deriving a Class.


      Constructors: Access Considerations.


      Using a Derived Class.


      Special Relationships Between Derived and Base Classes.


  Inheritance: An Is-a Relationship.


  Polymorphic Public Inheritance.


      Developing the Brass and BrassPlus Classes.


      Static and Dynamic Binding.


      Pointer and Reference Type Compatibility.


      Virtual Member Functions and Dynamic Binding.


      Things to Know About Virtual Methods.


  Access Control: protected.


  Abstract Base Classes.


      Applying the ABC Concept.


      ABC Philosophy.


  Inheritance and Dynamic Memory Allocation.


      Case 1: Derived Class Doesn't Use new.


      Case 2: Derived Class Does Use new.


      An Inheritance Example with Dynamic Memory Allocation and Friends.


  Class Design Review.


      Member Functions That the Compiler Generates for You.


      Other Class Method Considerations.


      Public Inheritance Considerations.


      Class Function Summary.


  Summary.


  Review Questions.


  Programming Exercises.

14. Reusing Code in C++.


  Classes with Object Members.


      The valarray Class: A Quick Look.


      The Student Class Design.


      The Student Class Example.


  Private Inheritance.


      The Student Class Example (New Version).


  Multiple Inheritance.


      How Many Workers?


      Which Method?


      MI Synopsis.


  Class Templates.


      Defining a Class Template.


      Using a Template Class.


      A Closer Look at the Template Class.


      An Array Template Example and Non-Type Arguments.


      Template Versatility.


      Template Specializations.


      Member Templates.


      Templates as Parameters.


      Template Classes and Friends.


  Summary.


  Review Questions.


  Programming Exercises.

15. Friends, Exceptions, and More.


  Friends.


      Friend Classes.


      Friend Member Functions.


      Other Friendly Relationships.


  Nested Classes.


      Nested Classes and Access.


      Nesting in a Template.


  Exceptions.


      Calling abort().


      Returning an Error Code.


      The Exception Mechanism.


      Using Objects as Exceptions.


      Unwinding the Stack.


      More Exception Features.


      The exception Class.


      Exceptions, Classes, and Inheritance.


      When Exceptions Go Astray.


      Exception Cautions.


  RTTI.


      What Is RTTI For?


      How Does RTTI Work?


  Type Cast Operators.


  Summary.


  Review Questions.


  Programming Exercises.

16. The string Class and the Standard Template Library.


  The string Class.


      Constructing a String.


      string Class Input.


      Working with Strings.


      What Else Does the string Class Offer?


  The auto--ptr Class.


      Using auto--ptr.


      auto--ptr Considerations.


  The STL.


      The vector Template Class.


      Things to Do to Vectors.


      More Things to Do to Vectors.


  Generic Programming.


      Why Iterators?


      Kinds of Iterators.


      Iterator Hierarchy.


      Concepts, Refinements, and Models.


      Kinds of Containers.


      Associative Containers.


  Function Objects (aka Functors).


      Functor Concepts.


      Predefined Functors.


      Adaptable Functors and Function Adapters.


  Algorithms.


        Algorithm Groups.


      General Properties of Algorithms.


      The STL and the string Class.


      Functions Versus Container Methods.


      Using the STL.


  Other Libraries.


      vector and valarray.


  Summary.


  Review Questions.


  Programming Exercises.

17. Input, Output, and Files.


  An Overview of C++ Input and Output.


      Streams and Buffers.


      Streams, Buffers, and the iostream File.


      Redirection.


  Output with cout.


      The Overloaded << Operator.


      The Other ostream Methods.


      Flushing the Output Buffer.


      Formatting with cout.


  Input with cin.


      How cin >> Views Input.


      Stream States.


      Other istream Class Methods.


      Other istream Methods.


  File Input and Output.


      Simple File I/O.


      Stream Checking and is--open().


      Opening Multiple Files.


      Command-Line Processing.


      File Modes.


      Random Access.


  Incore Formatting.


  What Now?


  Summary.


  Review Questions.


  Programming Exercises.

Appendix A. Number Bases.


  Decimal Numbers (Base 10).


  Octal Integers (Base 8).


  Hexadecimal Numbers (Base 16).


  Binary Numbers (Base 2).


  Binary and Hex.

Appendix B. C++ Reserved Words.


  C++ Keywords.


  Alternative Tokens.


  C++ Library Reserved Names.

Appendix C. The ASCII Character Set.

Appendix D. Operator Precedence.

Appendix E. Other Operators.


  Bitwise Operators.


      The Shift Operators.


      The Logical Bitwise Operators.


      Alternative Representations of Bitwise Operators.


      A Few Common Bitwise Operator Techniques.


  Member Dereferencing Operators.

Appendix F. The string Template Class.


  Thirteen Types and a Constant.


  Data Information, Constructors, and Odds and Ends.


      Default Constructors.


      Constructors That Use Arrays.


      Constructors That Use Part of an Array.


      Copy Constructors.


      Constructors That Use n Copies of a Character.


      Constructors That Use a Range.


      Memory Miscellany.


  String Access.


  Basic Assignment.


  String Searching.


      The find() Family.


      The rfind() Family.


      The find--first--of() Family.


      The find--last--of() Family.


      The find--first--not--of() Family.


      The find--last--not--of() Family.


  Comparison Methods and Functions.


    String Modifiers.


      Methods for Appending and Adding.


      More Assignment Methods.


      Insertion Methods.


      Erase Methods.


      Replacement Methods.


      Other Modifying Methods: copy() and swap().


  Output and Input.

Appendix G. The STL Methods and Functions.


  Members Common to All Containers.


  Additional Members for Vectors, Lists, and Deques.


  Additional Members for Sets and Maps.


  STL Functions.


      Nonmodifying Sequence Operations.


      Mutating Sequence Operations.


        Sorting and Related Operations.


      Numeric Operations.

Appendix H. Selected Readings and Internet Resources.


  Selected Readings.


  Internet Resources.

Appendix I. Converting to ANSI/ISO Standard C++.


  Use Alternatives for Some Preprocessor Directives.


      Use const Instead of #define to Define Constants.


      Use inline Instead of #define to Define Short Functions.


  Use Function Prototypes.


  Use Type Casts.


  Become Familiar with C++ Features.


    Use the New Header Organization.


  Use Namespaces.


  Use the autoptr Template.


  Use the string Class.


  Use the STL.

Appendix J. Answers to the Review Questions.


  Answers to Review Questions for Chapter 2.


  Answers to Review Questions for Chapter 3.


  Answers to Review Questions for Chapter 4.


  Answers to Review Questions for Chapter 5.


  Answers to Review Questions for C