Australasia's Biggest Online Store

We won't be beaten by anyone. Guaranteed

C++ How to Program [With Access Code]


Product Description
Product Details

Table of Contents

Preface xxi1 Introduction to Computers and C++ 11.1 Introduction 21.2 Computers: Hardware and Software 51.3 Data Hierarchy 61.4 Computer Organization 71.5 Machine Languages, Assembly Languages and High-Level Languages 91.6 Introduction to Object Technology 101.7 Operating Systems 131.8 Programming Languages 151.9 C++ and a Typical C++ Development Environment 171.10 Test-Driving a C++ Application 211.11 Web 2.0: Going Social 271.12 Software Technologies 291.13 Future of C++: TR1, the New C++ Standard and the Open Source Boost Libraries 311.14 Keeping Up-to-Date with Information Technologies 321.15 Wrap-Up 322 Introduction to C++ Programming 372.1 Introduction 382.2 First Program in C++: Printing a Line of Text 382.3 Modifying Our First C++ Program 422.4 Another C++ Program: Adding Integers 432.5 Memory Concepts 472.6 Arithmetic 482.7 Decision Making: Equality and Relational Operators 512.8 Wrap-Up 553 Introduction to Classes, Objects and Strings 643.1 Introduction 653.2 Defining a Class with a Member Function 653.3 Defining a Member Function with a Parameter 683.4 Data Members, set Functions and get Functions 713.5 Initializing Objects with Constructors 773.6 Placing a Class in a Separate File for Reusability 813.7 Separating Interface from Implementation 843.8 Validating Data with set Functions 903.9 Wrap-Up 954 Control Statements: Part1 1014.1 Introduction 1024.2 Algorithms 1024.3 Pseudocode 1034.4 Control Structures 1044.5 if Selection Statement 1074.6 if...else Double-Selection Statement 1084.7 while Repetition Statement 1134.8 Formulating Algorithms: Counter-Controlled Repetition 1144.9 Formulating Algorithms: Sentinel-Controlled Repetition 1204.10 Formulating Algorithms: Nested Control Statements 1304.11 Assignment Operators 1344.12 Increment and Decrement Operators 1354.13 Wrap-Up 1385 Control Statements: Part2 1525.1 Introduction 1535.2 Essentials of Counter-Controlled Repetition 1535.3 for Repetition Statement 1555.4 Examples Using the for Statement 1585.5 do...while Repetition Statement 1625.6 switch Multiple-Selection Statement 1645.7 break and continue Statements 1735.8 Logical Operators 1745.9 Confusing the Equality (==) and Assignment (=) Operators 1795.10 Structured Programming Summary 1805.11 Wrap-Up 1856 Functions and an Introduction to Recursion 1946.1 Introduction 1956.2 Program Components in C++ 1966.3 Math Library Functions 1976.4 Function Definitions with Multiple Parameters 1986.5 Function Prototypes and Argument Coercion 2036.6 C++ Standard Library Headers 2056.7 Case Study: Random Number Generation 2076.8 Case Study: Game of Chance; Introducing enum 2126.9 Storage Classes 2156.10 Scope Rules 2186.11 Function Call Stack and Activation Records 2216.12 Functions with Empty Parameter Lists 2256.13 Inline Functions 2256.14 References and Reference Parameters 2276.15 Default Arguments 2316.16 Unary Scope Resolution Operator 2326.17 Function Overloading 2346.18 Function Templates 2366.19 Recursion 2396.20 Example Using Recursion: Fibonacci Series 2426.21 Recursion vs. Iteration 2456.22 Wrap-Up 2487 Arrays and Vectors 2677.1 Introduction 2687.2 Arrays 2697.3 Declaring Arrays 2707.4 Examples Using Arrays 2717.4.1 Declaring an Array and Using a Loop to Initialize the Array's Elements 2717.4.2 Initializing an Array in a Declaration with an Initializer List 2727.4.3 Specifying an Array's Size with a Constant Variable and Setting Array Elements with Calculations 2737.4.4 Summing the Elements of an Array 2757.4.5 Using Bar Charts to Display Array Data Graphically 2767.4.6 Using the Elements of an Array as Counters 2777.4.7 Using Arrays to Summarize Survey Results 2787.4.8 Static Local Arrays and Automatic Local Arrays 2817.5 Passing Arrays to Functions 2837.6 Case Study: Class GradeBook Using an Array to Store Grades 2877.7 Searching Arrays with Linear Search 2937.8 Sorting Arrays with Insertion Sort 2947.9 Multidimensional Arrays 2977.10 Case Study: Class GradeBook Using a Two-Dimensional Array 3007.11 Introduction to C++ Standard Library Class Template vector 3077.12 Wrap-Up 3138 Pointers 3308.1 Introduction 3318.2 Pointer Variable Declarations and Initialization 3318.3 Pointer Operators 3328.4 Pass-by-Reference with Pointers 3358.5 Using const with Pointers 3398.6 Selection Sort Using Pass-by-Reference 3438.7 sizeof Operator 3478.8 Pointer Expressions and Pointer Arithmetic 3498.9 Relationship Between Pointers and Arrays 3528.10 Pointer-Based String Processing 3548.11 Arrays of Pointers 3578.12 Function Pointers 3588.13 Wrap-Up 3619 Classes: A Deeper Look, Part1 3799.1 Introduction 3809.2 Time Class Case Study 3819.3 Class Scope and Accessing Class Members 3889.4 Separating Interface from Implementation 3899.5 Access Functions and Utility Functions 3909.6 Time Class Case Study: Constructors with Default Arguments 3939.7 Destructors 3989.8 When Constructors and Destructors Are Called 3999.9 Time Class Case Study: A Subtle Trap-Returning a Reference to a private Data Member 4029.10 Default Memberwise Assignment 4059.11 Wrap-Up 40710 Classes: A Deeper Look, Part2 41410.1 Introduction 41510.2 const (Constant) Objects and const Member Functions 41510.3 Composition: Objects as Members of Classes 42310.4 friend Functions and friend Classes 42910.5 Using the this Pointer 43110.6 static Class Members 43610.7 Proxy Classes 44110.8 Wrap-Up 44511 Operator Overloading; Class string 45111.1 Introduction 45211.2 Using the Overloaded Operators of Standard Library Class string 45311.3 Fundamentals of Operator Overloading 45611.4 Overloading Binary Operators 45711.5 Overloading the Binary Stream Insertion and Stream Extraction Operators 45811.6 Overloading Unary Operators 46211.7 Overloading the Unary Prefix and Postfix ++ and -- Operators 46311.8 Case Study: A Date Class 46411.9 Dynamic Memory Management 46911.10 Case Study: Array Class 47111.10.1 Using the Array Class 47211.10.2 Array Class Definition 47511.11 Operators as Member Functions vs. Non-Member Functions 48311.12 Converting between Types 48311.13 explicit Constructors 48511.14 Building a String Class 48711.15 Wrap-Up 48812 Object-Oriented Programming: Inheritance 49912.1 Introduction 50012.2 Base Classes and Derived Classes 50012.3 protected Members 50312.4 Relationship between Base Classes and Derived Classes 50312.4.1 Creating and Using a CommissionEmployee Class 50412.4.2 Creating a BasePlusCommissionEmployee Class Without Using Inheritance 50812.4.3 Creating a CommissionEmployee-BasePlusCommissionEmployee Inheritance Hierarchy 51412.4.4 CommissionEmployee-BasePlusCommissionEmployee Inheritance Hierarchy Using protected Data 51912.4.5 CommissionEmployee-BasePlusCommissionEmployee Inheritance Hierarchy Using private Data 52212.5 Constructors and Destructors in Derived Classes 52712.6 public, protected and private Inheritance 52712.7 Software Engineering with Inheritance 52812.8 Wrap-Up 52913 Object-Oriented Programming: Polymorphism 53413.1 Introduction 53513.2 Introduction to Polymorphism: Polymorphic Video Game 53613.3 Relationships Among Objects in an Inheritance Hierarchy 53613.3.1 Invoking Base-Class Functions from Derived-Class Objects 53713.3.2 Aiming Derived-Class Pointers at Base-Class Objects 54013.3.3 Derived-Class Member-Function Calls via Base-Class Pointers 54113.3.4 Virtual Functions 54313.4 Type Fields and switch Statements 54913.5 Abstract Classes and Pure virtual Functions 54913.6 Case Study: Payroll System Using Polymorphism 55113.6.1 Creating Abstract Base Class Employee 55213.6.2 Creating Concrete Derived Class SalariedEmployee 55613.6.3 Creating Concrete Derived Class CommissionEmployee 55813.6.4 Creating Indirect Concrete Derived Class BasePlusCommissionEmployee 56013.6.5 Demonstrating Polymorphic Processing 56213.7 (Optional) Polymorphism, Virtual Functions and Dynamic Binding "Under the Hood" 56613.8 Case Study: Payroll System Using Polymorphism and Runtime Type Information with Downcasting, dynamic_cast, typeid and type_info 56913.9 Virtual Destructors 57313.10 Wrap-Up 57314 Templates 57914.1 Introduction 58014.2 Function Templates 58014.3 Overloading Function Templates 58314.4 Class Templates 58414.5 Nontype Parameters and Default Types for Class Templates 59014.6 Wrap-Up 59115 Stream Input/Output 59515.1 Introduction 59615.2 Streams 59715.2.1 Classic Streams vs. Standard Streams 59715.2.2 iostream Library Headers 59815.2.3 Stream Input/Output Classes and Objects 59815.3 Stream Output 60115.3.1 Output of char * Variables 60115.3.2 Character Output Using Member Function put 60115.4 Stream Input 60215.4.1 get and getline Member Functions 60215.4.2 istream Member Functions peek, putback and ignore 60515.4.3 Type-Safe I/O 60515.5 Unformatted I/O Using read, write and gcount 60515.6 Introduction to StreamManipulators 60615.6.1 Integral Stream Base: dec, oct, hex and setbase 60715.6.2 Floating-Point Precision (precision, setprecision) 60715.6.3 Field Width (width, setw) 60915.6.4 User-Defined Output Stream Manipulators 61015.7 Stream Format States and Stream Manipulators 61215.7.1 Trailing Zeros and Decimal Points (showpoint) 61215.7.2 Justification (left, right and internal) 61315.7.3 Padding (fill, setfill) 61515.7.4 Integral Stream Base (dec, oct, hex, showbase) 61615.7.5 Floating-Point Numbers; Scientific and Fixed Notation (scientific, fixed) 61715.7.6 Uppercase/Lowercase Control (uppercase) 61815.7.7 Specifying Boolean Format (boolalpha) 61815.7.8 Setting and Resetting the Format State via Member Function flags 61915.8 Stream Error States 62015.9 Tying an Output Stream to an Input Stream 62215.10 Wrap-Up 62316 Exception Handling: A Deeper Look 63216.1 Introduction 63316.2 Example: Handling an Attempt to Divide by Zero 63316.3 When to Use Exception Handling 63916.4 Rethrowing an Exception 64016.5 Exception Specifications 64116.6 Processing Unexpected Exceptions 64216.7 Stack Unwinding 64216.8 Constructors, Destructors and Exception Handling 64416.9 Exceptions and Inheritance 64516.10 Processing new Failures 64516.11 Class unique_ptr and Dynamic Memory Allocation 64816.12 Standard Library Exception Hierarchy 65016.13 Wrap-Up 65217 File Processing 65817.1 Introduction 65917.2 Files and Streams 65917.3 Creating a Sequential File 66017.4 Reading Data from a Sequential File 66417.5 Updating Sequential Files 66917.6 Random-Access Files 67017.7 Creating a Random-Access File 67117.8 Writing Data Randomly to a Random-Access File 67517.9 Reading from a Random-Access File Sequentially 67717.10 Case Study: A Transaction-Processing Program 67917.11 Object Serialization 68617.12 Wrap-Up 68618 Class string and String Stream Processing 69618.1 Introduction 69718.2 string Assignment and Concatenation 69818.3 Comparing strings 70018.4 Substrings 70318.5 Swapping strings 70318.6 string Characteristics 70418.7 Finding Substrings and Characters in a string 70618.8 Replacing Characters in a string 70818.9 Inserting Characters into a string 71018.10 Conversion to C-Style Pointer-Based char * Strings 71118.11 Iterators 71318.12 String Stream Processing 71418.13 Wrap-Up 71719 Searching and Sorting 72419.1 Introduction 72519.2 Searching Algorithms 72519.2.1 Efficiency of Linear Search 72619.2.2 Binary Search 72719.3 Sorting Algorithms 73219.3.1 Efficiency of Selection Sort 73319.3.2 Efficiency of Insertion Sort 73319.3.3 Merge Sort (A Recursive Implementation) 73319.4 Wrap-Up 74020 Custom Templatized Data Structures 74620.1 Introduction 74720.2 Self-Referential Classes 74820.3 Dynamic Memory Allocation and Data Structures 74920.4 Linked Lists 74920.5 Stacks 76420.6 Queues 76820.7 Trees 77220.8 Wrap-Up 78021 Bits, Characters, C Strings and structs 79121.1 Introduction 79221.2 Structure Definitions 79221.3 typedef 79421.4 Example: Card Shuffling and Dealing Simulation 79421.5 Bitwise Operators 79721.6 Bit Fields 80621.7 Character-Handling Library 81021.8 Pointer-Based String Manipulation Functions 81521.9 Pointer-Based String-Conversion Functions 82221.10 Search Functions of the Pointer-Based String-Handling Library 82721.11 Memory Functions of the Pointer-Based String-Handling Library 83121.12 Wrap-Up 83522 Standard Template Library (STL) 85022.1 Introduction to the Standard Template Library (STL) 85122.2 Introduction to Containers 85322.3 Introduction to Iterators 85622.4 Introduction to Algorithms 86122.5 Sequence Containers 86322.5.1 vector Sequence Container 86422.5.2 list Sequence Container 87122.5.3 deque Sequence Container 87522.6 Associative Containers 87722.6.1 multiset Associative Container 87722.6.2 set Associative Container 88022.6.3 multimap Associative Container 88122.6.4 map Associative Container 88322.7 Container Adapters 88522.7.1 stack Adapter 88522.7.2 queue Adapter 88722.7.3 priority_queue Adapter 88822.8 Algorithms 89022.8.1 fill, fill_n, generate and generate_n 89022.8.2 equal, mismatch and lexicographical_compare 89222.8.3 remove, remove_if, remove_copy and remove_copy_if 89522.8.4 replace, replace_if, replace_copy and replace_copy_if 89722.8.5 Mathematical Algorithms 90022.8.6 Basic Searching and Sorting Algorithms 90322.8.7 swap, iter_swap and swap_ranges 90522.8.8 copy_backward, merge, unique and reverse 90622.8.9 inplace_merge, unique_copy and reverse_copy 90922.8.10 Set Operations 91022.8.11 lower_bound, upper_bound and equal_range 91322.8.12 Heapsort 91522.8.13 min and max 91822.8.14 STL Algorithms Not Covered in This Chapter 91922.9 Class bitset 92022.10 Function Objects 92422.11 Wrap-Up 92723 Boost Libraries, Technical Report 1 and C++0x 93623.1 Introduction 93723.2 Deitel Online C++ and Related Resource Centers 93723.3 Boost Libraries 93723.4 Boost Libraries Overview 93823.5 Regular Expressions with the regex Library 94123.5.1 Regular Expression Example 94223.5.2 Validating User Input with Regular Expressions 94423.5.3 Replacing and Splitting Strings 94723.6 Smart Pointers 95023.6.1 Reference Counted shared_ptr 95023.6.2 weak_ptr: shared_ptr Observer 95423.7 Technical Report 1 96023.8 C++0x 96123.9 Core Language Changes 96223.10 Wrap-Up 96724 Other Topics 97424.1 Introduction 97524.2 const_cast Operator 97524.3 mutable Class Members 97724.4 namespaces 97924.5 Operator Keywords 98224.6 Pointers to Class Members (.* and ->*) 98424.7 Multiple Inheritance 98624.8 Multiple Inheritance and virtual Base Classes 99124.9 Wrap-Up 996Chapters on the Web 1001A Operator Precedence and Associativity 1002B ASCII Character Set 1004C Fundamental Types 1005D Number Systems 1007D.1 Introduction 1008D.2 Abbreviating Binary Numbers as Octal and Hexadecimal Numbers 1011D.3 Converting Octal and Hexadecimal Numbers to Binary Numbers 1012D.4 Converting from Binary, Octal or Hexadecimal to Decimal 1012D.5 Converting from Decimal to Binary, Octal or Hexadecimal 1013D.6 Negative Binary Numbers: Two's Complement Notation 1015E Preprocessor 1020E.1 Introduction 1021E.2 #include Preprocessor Directive 1021E.3 #define Preprocessor Directive: Symbolic Constants 1022E.4 #define Preprocessor Directive: Macros 1022E.5 Conditional Compilation 1024E.6 #error and #pragma Preprocessor Directives 1025E.7 Operators # and ## 1026E.8 Predefined Symbolic Constants 1026E.9 Assertions 1027E.10 Wrap-Up 1027Appendices on theWeb 1033Index 1035Chapters 25-26 and Appendices F-I are PDF documents posted online at the book'sCompanion Website, which is accessible from ATM Case Study, Part 1:Object-Oriented Design with the UML 25-125.1 Introduction 25-225.2 Introduction to Object-Oriented Analysis and Design 25-225.3 Examining the ATM Requirements Document 25-325.4 Identifying the Classes in the ATM Requirements Document 25-1025.5 Identifying Class Attributes 25-1725.6 Identifying Objects' States and Activities 25-2125.7 Identifying Class Operations 25-2525.8 Indicating Collaboration Among Objects 25-3225.9 Wrap-Up 25-3926 ATM Case Study, Part 2:Implementing an Object-Oriented Design 26-126.1 Introduction 26-226.2 Starting to Program the Classes of the ATM System 26-226.3 Incorporating Inheritance into the ATM System 26-826.4 ATMCase Study Implementation 26-1526.4.1 Class ATM 26-1626.4.2 Class Screen 26-2326.4.3 Class Keypad 26-2526.4.4 Class CashDispenser 26-2626.4.5 Class DepositSlot 26-2826.4.6 Class Account 26-2926.4.7 Class BankDatabase 26-3126.4.8 Class Transaction 26-3526.4.9 Class BalanceInquiry 26-3726.4.10 Class Withdrawal 26-3926.4.11 Class Deposit 26-4426.4.12 Test Program ATMCaseStudy.cpp 26-4726.5 Wrap-Up 26-47F C Legacy Code Topics F-1F.1 Introduction F-2F.2 Redirecting Input/Output on UNIX/Linux/Mac OS Xand Windows Systems F-2F.3 Variable-Length Argument Lists F-3F.4 Using Command-Line Arguments F-5F.5 Notes on Compiling Multiple-Source-File Programs F-7F.6 Program Termination with exit and atexit F-9F.7 Type Qualifier volatile F-10F.8 Suffixes for Integer and Floating-Point Constants F-10F.9 Signal Handling F-11F.10 Dynamic Memory Allocation with calloc and realloc F-13F.11 Unconditional Branch: goto F-14F.12 Unions F-15F.13 Linkage Specifications F-18F.14 Wrap-Up F-19G UML 2: Additional Diagram Types G-1G.1 Introduction G-1G.2 Additional Diagram Types G-2H Using the Visual Studio Debugger H-1H.1 Introduction H-2H.2 Breakpoints and the Continue Command H-2H.3 Locals and Watch Windows H-8H.4 Controlling Execution Using the Step Into, Step Over, Step Outand Continue Commands H-11H.5 Autos Window H-13H.6 Wrap-Up H-14I Using the GNU C++ Debugger I-1I.1 Introduction I-2I.2 Breakpoints and the run, stop, continue and print Commands I-2I.3 print and set Commands I-8I.4 Controlling Execution Using the step, finish andnext Commands I-10I.5 watch Command I-13I.6 Wrap-Up I-15

About the Author

Paul J. Deitel, CEO and Chief Technical Officer of Deitel & Associates, Inc., is a graduate of MIT's Sloan School of Management, where he studied Information Technology. He holds the Java Certified Programmer and Java Certified Developer certifications, and has been designated by Sun Microsystems as a Java Champion. Through Deitel & Associates, Inc., he has delivered Java, C, C++, C# and Visual Basic courses to industry clients, including IBM, Sun Microsystems, Dell, Lucent Technologies, Fidelity, NASA at the Kennedy Space Center, the National Severe Storm Laboratory, White Sands Missile Range, Rogue Wave Software, Boeing, Stratus, Cambridge Technology Partners, Open Environment Corporation, One Wave, Hyperion Software, Adra Systems, Entergy, CableData Systems, Nortel Networks, Puma, iRobot, Invensys and many more. He has also lectured on Java and C++ for the Boston Chapter of the Association for Computing Machinery. He and his father, Dr. Harvey M. Deitel, are the world's best-selling programming language textbook authors.
Dr. Harvey M. Deitel, Chairman and Chief Strategy Officer of Deitel & Associates, Inc., has 45 years of academic and industry experience in the computer field. Dr. Deitel earned B.S. and M.S. degrees from the MIT and a Ph.D. from Boston University. He has 20 years of college teaching experience, including earning tenure and serving as the Chairman of the Computer Science Department at Boston College before founding Deitel & Associates, Inc., with his son, Paul J. Deitel. He and Paul are the co-authors of several dozen books and multimedia packages and they are writing many more. With translations published in Japanese, German, Russian, Spanish, Traditional Chinese, Simplified Chinese, Korean, French, Polish, Italian, Portuguese, Greek, Urdu and Turkish, the Deitels' texts have earned international recognition. Dr. Deitel has delivered hundreds of professional seminars to major corporations, academic institutions, government organizations and the military.

Ask a Question About this Product More...
Write your question below:
Look for similar items by category
Home » Books » Computers » Programming » C++
How Fishpond Works
Fishpond works with suppliers all over the world to bring you a huge selection of products, really great prices, and delivery included on over 25 million products that we sell. We do our best every day to make Fishpond an awesome place for customers to shop and get what they want — all at the best prices online.
Webmasters, Bloggers & Website Owners
You can earn a 5% commission by selling C++ How to Program [With Access Code] on your website. It's easy to get started - we will give you example code. After you're set-up, your website can earn you money while you work, play or even sleep! You should start right now!
Authors / Publishers
Are you the Author or Publisher of a book? Or the manufacturer of one of the millions of products that we sell. You can improve sales and grow your revenue by submitting additional information on this title. The better the information we have about a product, the more we will sell!
Back to top