,

C++ How to Program (Early Objects Version) (2-downloads)

E-book Engels 2016 9780134448879
Verwachte levertijd ongeveer 9 werkdagen

Samenvatting

C++ How to Program presents leading-edge computing technologies in a friendly manner appropriate for introductory college course sequences, based on the curriculum recommendations of two key professional organizations–the ACM and the IEEE.

The best-selling C++ How to Program is accessible to readers with little or no programming experience, yet comprehensive enough for the professional programmer. The Deitels’ signature live-code approach presents the concepts in the context of full working programs followed by sample executions. The early objects approach gets readers thinking about objects immediately–allowing them to more thoroughly master the concepts. Emphasis is placed on achieving program clarity and building well-engineered software. Interesting, entertaining, and challenging exercises encourage students to make a difference and use computers and the Internet to work on problems. To keep readers up-to-date with leading-edge computing technologies, the Tenth Edition conforms to the C++11 standard and the new C++14 standard.

Also available with  MyLab Programming
This title is also available with MyLab ™  Programming—an online learning system designed to engage students and improve results. MyLab Programming consists of a set of programming exercises correlated to the programming concepts in this book. Through hundreds of practice problems, the system automatically detects errors in the logic and syntax of their code submissions and offers targeted hints that enable students to figure out what went wrong–and why. MyLab Programming improves the programming competence of beginning students who often struggle with the basic concepts and paradigms of popular high-level programming languages. For instructors, a comprehensive gradebook tracks correct and incorrect answers and stores the code inputted by students for review.

Note: You are purchasing a standalone product; MyLab Programming does not come packaged with this content. Students, if interested in purchasing this title with MyLab Programming, ask your instructor for the correct package ISBN and Course ID. Instructors, contact your Pearson representative for more information.

If you would like to purchase both the physical text and MyLab Programming, search for:

0134583000 / 9780134583006 C++ How to Program Plus  MyLab Programming  with Pearson eText -- Access Card Package, 10/e
Package consists of:
0134448987 / 9780134448985 MyLab Programming with Pearson eText -- Access Code Card -- for C++ How to Program (Early Objects Version) 0134448235 / 9780134448237 C++ How to Program

Specificaties

ISBN13:9780134448879
Taal:Engels
Bindwijze:e-book

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Inhoudsopgave

Preface xxiii <br>Before You Begin xxxix <br> 1 Introduction to Computers and C++ 1 <br>1.1 Introduction <br>1.2 Computers and the Internet in Industry and Research <br>1.3 Hardware and Software <br>1.3.1 Moore’s Law <br>1.3.2 Computer Organization <br>1.4 Data Hierarchy <br>1.5 Machine Languages, Assembly Languages and High-Level Languages <br>1.6 C and C++ <br>1.7 Programming Languages <br>1.8 Introduction to Object Technology <br>1.9 Typical C++ Development Environment <br>1.10 Test-Driving a C++ Application <br>1.10.1 Compiling and Running an Application in Visual Studio 2015 for Windows <br>1.10.2 Compiling and Running Using GNU C++ on Linux <br>1.10.3 Compiling and Running with Xcode on Mac OS X <br>1.11 Operating Systems <br>1.11.1 Windows–A Proprietary Operating System <br>1.11.2 Linux–An Open-Source Operating System <br>1.11.3 Apple’s OS X; Apple’s iOS for iPhone®, iPad® and iPod Touch® Devices <br>1.11.4 Google’s Android <br>1.12 The Internet and the World Wide Web <br>1.13 Some Key Software Development Terminology <br>1.14 C++11 and C++14: The Latest C++ Versions <br>1.15 Boost C++ Libraries <br>1.16 Keeping Up to Date with Information Technologies <br> <br>2 Introduction to C++ Programming, Input/Output and Operators <br>2.1 Introduction <br>2.2 First Program in C++: Printing a Line of Text <br>2.3 Modifying Our First C++ Program <br>2.4 Another C++ Program: Adding Integers <br>2.5 Memory Concepts <br>2.6 Arithmetic <br>2.7 Decision Making: Equality and Relational Operators <br>2.8 Wrap-Up <br> <br>3 Introduction to Classes, Objects, Member Functions and Strings <br>3.1 Introduction <br>3.2 Test-Driving an Account Object <br>3.2.1 Instantiating an Object <br>3.2.2 Headers and Source-Code Files <br>3.2.3 Calling Class Account’s getName Member Function <br>3.2.4 Inputting a string with getline <br>3.2.5 Calling Class Account’s setName Member Function <br>3.3 Account Class with a Data Member and Set and Get Member Functions <br>3.3.1 Account Class Definition <br>3.3.2 Keyword class and the Class Body <br>3.3.3 Data Member name of Type string <br>3.3.4 setName Member Function <br>3.3.5 getName Member Function <br>3.3.6 Access Specifiers private and public <br>3.3.7 Account UML Class Diagram <br>3.4 Account Class: Initializing Objects with Constructors <br>3.4.1 Defining an Account Constructor for Custom Object Initialization <br>3.4.2 Initializing Account Objects When They’re Created <br>3.4.3 Account UML Class Diagram with a Constructor <br>3.5 Software Engineering with Set and Get Member Functions <br>3.6 Account Class with a Balance; Data Validation <br>3.6.1 Data Member balance <br>3.6.2 Two-Parameter Constructor with Validation <br>3.6.3 deposit Member Function with Validation <br>3.6.4 getBalance Member Function <br>3.6.5 Manipulating Account Objects with Balances <br>3.6.6 Account UML Class Diagram with a Balance and Member Functions deposit and getBalance <br>3.7 Wrap-Up <br> <br>4 Algorithm Development and Control Statements: Part 1 <br>4.1 Introduction <br>4.2 Algorithms <br>4.3 Pseudocode <br>4.4 Control Structures <br>4.4.1 Sequence Structure <br>4.4.2 Selection Statements <br>4.4.3 Iteration Statements <br>4.4.4 Summary of Control Statements <br>4.5 if Single-Selection Statement <br>4.6 if…else Double-Selection Statement <br>4.6.1 Nested if…else Statements <br>4.6.2 Dangling-else Problem <br>4.6.3 Blocks <br>4.6.4 Conditional Operator (?:) <br>4.7 Student Class: Nested if…else Statements <br>4.8 while Iteration Statement <br>4.9 Formulating Algorithms: Counter-Controlled Iteration <br>4.9.1 Pseudocode Algorithm with Counter-Controlled Iteration <br>4.9.2 Implementing Counter-Controlled Iteration <br>4.9.3 Notes on Integer Division and Truncation <br>4.9.4 Arithmetic Overflow <br>4.9.5 Input Validation <br>4.10 Formulating Algorithms: Sentinel-Controlled Iteration <br>4.10.1 Top-Down, Stepwise Refinement: The Top and First Refinement <br>4.10.2 Proceeding to the Second Refinement <br>4.10.3 Implementing Sentinel-Controlled Iteration <br>4.10.4 Converting Between Fundamental Types Explicitly and Implicitly <br>4.10.5 Formatting Floating-Point Numbers <br>4.10.6 Unsigned Integers and User Input <br>4.11 Formulating Algorithms: Nested Control Statements <br>4.11.1 Problem Statement <br>4.11.2 Top-Down, Stepwise Refinement: Pseudocode Representation of the Top <br>4.11.3 Top-Down, Stepwise Refinement: First Refinement <br>4.11.4 Top-Down, Stepwise Refinement: Second Refinement <br>4.11.5 Complete Second Refinement of the Pseudocode <br>4.11.6 Program That Implements the Pseudocode Algorithm <br>4.11.7 Preventing Narrowing Conversions with List Initialization <br>4.12 Compound Assignment Operators <br>4.13 Increment and Decrement Operators <br>4.14 Fundamental Types Are Not Portable <br>4.15Wrap-Up <br> <br>5 Control Statements: Part 2; Logical Operators <br>5.1 Introduction <br>5.2 Essentials of Counter-Controlled Iteration <br>5.3 for Iteration Statement <br>5.4 Examples Using the for Statement <br>5.5 Application: Summing Even Integers <br>5.6 Application: Compound-Interest Calculations <br>5.7 Case Study: Integer-Based Monetary Calculations with Class DollarAmount <br>5.7.1 Demonstrating Class DollarAmount <br>5.7.2 Class DollarAmount <br>5.8 do…while Iteration Statement <br>5.9 switch Multiple-Selection Statement <br>5.10 break and continue Statements <br>5.10.1 break Statement <br>5.10.2 continue Statement <br>5.11 Logical Operators <br>5.11.1 Logical AND (&amp;&amp;) Operator <br>5.11.2 Logical OR (||) Operator <br>5.11.3 Short-Circuit Evaluation <br>5.11.4 Logical Negation (!) Operator <br>5.11.5 Logical Operators Example <br>5.12 Confusing the Equality (==) and Assignment (=) Operators <br>5.13 Structured-Programming Summary <br>5.14Wrap-Up <br> <br>6 Functions and an Introduction to Recursion <br>6.1 Introduction <br>6.2 Program Components in C++ <br>6.3 Math Library Functions <br>6.4 Function Prototypes <br>6.5 Function-Prototype and Argument-Coercion Notes <br>6.5.1 Function Signatures and Function Prototypes <br>6.5.2 Argument Coercion <br>6.5.3 Argument-Promotion Rules and Implicit Conversions <br>6.6 C++ Standard Library Headers <br>6.7 Case Study: Random-Number Generation <br>6.7.1 Rolling a Six-Sided Die <br>6.7.2 Rolling a Six-Sided Die 60,000,000 Times <br>6.7.3 Randomizing the Random-Number Generator with srand <br>6.7.4 Seeding the Random-Number Generator with the Current Time <br>6.7.5 Scaling and Shifting Random Numbers <br>6.8 Case Study: Game of Chance; Introducing Scoped enums <br>6.9 C++11 Random Numbers <br>6.10 Scope Rules <br>6.11 Function-Call Stack and Activation Records <br>6.12 Inline Functions <br>6.13 References and Reference Parameters <br>6.14 Default Arguments <br>6.15 Unary Scope Resolution Operator <br>6.16 Function Overloading <br>6.17 Function Templates <br>6.18Recursion <br>6.19 Example Using Recursion: Fibonacci Series <br>6.20 Recursion vs. Iteration <br>6.21Wrap-Up <br> <br>7 Class Templates array and vector; Catching Exceptions <br>7.1 Introduction <br>7.2 arrays <br>7.3 Declaring arrays <br>7.4 Examples Using arrays <br>7.4.1 Declaring an array and Using a Loop to Initialize the array’s Elements <br>7.4.2 Initializing an array in a Declaration with an Initializer List <br>7.4.3 Specifying an array’s Size with a Constant Variable and Setting array Elements with Calculations <br>7.4.4 Summing the Elements of an array <br>7.4.5 Using a Bar Chart to Display array Data Graphically <br>7.4.6 Using the Elements of an array as Counters <br>7.4.7 Using arrays to Summarize Survey Results <br>7.4.8 Static Local arrays and Automatic Local arrays <br>7.5 Range-Based for Statement <br>7.6 Case Study: Class GradeBook Using an array to Store Grades <br>7.7 Sorting and Searching arrays <br>7.7.1 Sorting <br>7.7.2 Searching <br>7.7.3 Demonstrating Functions sort and binary_search <br>7.8 Multidimensional arrays <br>7.9 Case Study: Class GradeBook Using a Two-Dimensional array <br>7.10 Introduction to C++ Standard Library Class Template vector <br>7.11Wrap-Up <br> <br> 8 Pointers <br>8.1 Introduction <br>8.2 Pointer Variable Declarations and Initialization <br>8.2.1 Declaring Pointers <br>8.2.2 Initializing Pointers <br>8.2.3 Null Pointers Prior to C++11 <br>8.3 Pointer Operators <br>8.3.1 Address (&amp;) Operator <br>8.3.2 Indirection (*) Operator <br>8.3.3 Using the Address (&amp;) and Indirection (*) Operators <br>8.4 Pass-by-Reference with Pointers <br>8.5 Built-In Arrays <br>8.5.1 Declaring and Accessing a Built-In Array <br>8.5.2 Initializing Built-In Arrays <br>8.5.3 Passing Built-In Arrays to Functions <br>8.5.4 Declaring Built-In Array Parameters <br>8.5.5 C++11: Standard Library Functions begin and end <br>8.5.6 Built-In Array Limitations <br>8.5.7 Built-In Arrays Sometimes Are Required <br>8.6 Using const with Pointers <br>8.6.1 Nonconstant Pointer to Nonconstant Data <br>8.6.2 Nonconstant Pointer to Constant Data <br>8.6.3 Constant Pointer to Nonconstant Data <br>8.6.4 Constant Pointer to Constant Data <br>8.7 sizeof Operator <br>8.8 Pointer Expressions and Pointer Arithmetic <br>8.8.1 Adding Integers to and Subtracting Integers from Pointers <br>8.8.2 Subtracting Pointers <br>8.8.3 Pointer Assignment <br>8.8.4 Cannot Dereference a void* <br>8.8.5 Comparing Pointers <br>8.9 Relationship Between Pointers and Built-In Arrays <br>8.9.1 Pointer/Offset Notation <br>8.9.2 Pointer/Offset Notation with the Built-In Array’s Name as the Pointer <br>8.9.3 Pointer/Subscript Notation <br>8.9.4 Demonstrating the Relationship Between Pointers and Built-In Arrays <br>8.10 Pointer-Based Strings (Optional) <br>8.11 Note About Smart Pointers <br>8.12Wrap-Up <br> <br>9 Classes: A Deeper Look <br>9.1 Introduction <br>9.2 Time Class Case Study: Separating Interface from Implementation <br>9.2.1 Interface of a Class <br>9.2.2 Separating the Interface from the Implementation <br>9.2.3 Time Class Definition <br>9.2.4 Time Class Member Functions <br>9.2.5 Scope Resolution Operator (::) <br>9.2.6 Including the Class Header in the Source-Code File <br>9.2.7 Time Class Member Function setTime and Throwing Exceptions <br>9.2.8 Time Class Member Function toUniversalString and String Stream Processing <br>9.2.9 Time Class Member Function toStandardString <br>9.2.10 Implicitly Inlining Member Functions <br>9.2.11 Member Functions vs. Global Functions <br>9.2.12 Using Class Time <br>9.2.13 Object Size <br>9.3 Compilation and Linking Process <br>9.4 Class Scope and Accessing Class Members <br>9.5 Access Functions and Utility Functions <br>9.6 Time Class Case Study: Constructors with Default Arguments <br>9.6.1 Constructors with Default Arguments <br>9.6.2 Overloaded Constructors and C++11 Delegating Constructors <br>9.7 Destructors <br>9.8 When Constructors and Destructors Are Called <br>9.8.1 Constructors and Destructors for Objects in Global Scope <br>9.8.2 Constructors and Destructors for Non-static Local Objects <br>9.8.3 Constructors and Destructors for static Local Objects <br>9.8.4 Demonstrating When Constructors and Destructors Are Called <br>9.9 Time Class Case Study: A Subtle Trap–Returning a Reference or a Pointer to a private Data Member <br>9.10 Default Memberwise Assignment <br>9.11 const Objects and const Member Functions <br>9.12 Composition: Objects as Members of Classes <br>9.13 friend Functions and friend Classes <br>9.14 Using the this Pointer <br>9.14.1 Implicitly and Explicitly Using the this Pointer to Access an Object’s Data Members <br>9.14.2 Using the this Pointer to Enable Cascaded Function Calls <br>9.15 static Class Members <br>9.15.1 Motivating Classwide Data <br>9.15.2 Scope and Initialization of static Data Members <br>9.15.3 Accessing static Data Members <br>9.15.4 Demonstrating static Data Members <br>9.16Wrap-Up <br> <br>10 Operator Overloading; Class string <br>10.1 Introduction <br>10.2 Using the Overloaded Operators of Standard Library Class string <br>10.3 Fundamentals of Operator Overloading <br>10.3.1 Operator Overloading Is Not Automatic <br>10.3.2 Operators That You Do Not Have to Overload <br>10.3.3 Operators That Cannot Be Overloaded <br>10.3.4 Rules and Restrictions on Operator Overloading <br>10.4 Overloading Binary Operators <br>10.5 Overloading the Binary Stream Insertion and Stream Extraction Operators <br>10.6 Overloading Unary Operators <br>10.7 Overloading the Increment and Decrement Operators <br>10.8 Case Study: A Date Class <br>10.9 Dynamic Memory Management <br>10.10 Case Study: Array Class <br>10.10.1 Using the Array Class <br>10.10.2 Array Class Definition <br>10.11 Operators as Member vs. Non-Member Functions <br>10.12 Converting Between Types <br>10.13 explicit Constructors and Conversion Operators <br>10.14 Overloading the Function Call Operator () <br>10.15 Wrap-Up <br> <br>11 Object-Oriented Programming: Inheritance <br>11.1 Introduction <br>11.2 Base Classes and Derived Classes <br>11.2.1 CommunityMember Class Hierarchy <br>11.2.2 Shape Class Hierarchy <br>11.3 Relationship between Base and Derived Classes <br>11.3.1 Creating and Using a CommissionEmployee Class <br>11.3.2 Creating a BasePlusCommissionEmployee Class Without Using Inheritance <br>11.3.3 Creating a CommissionEmployee—BasePlusCommissionEmployee Inheritance Hierarchy <br>11.3.4 CommissionEmployee—BasePlusCommissionEmployee Inheritance Hierarchy Using protected Data <br>11.3.5 CommissionEmployee—BasePlusCommissionEmployee Inheritance Hierarchy Using private Data <br>11.4 Constructors and Destructors in Derived Classes <br>11.5 public, protected and private Inheritance <br>11.6Wrap-Up <br> <br>12 Object-Oriented Programming: Polymorphism <br>12.1 Introduction <br>12.2 Introduction to Polymorphism: Polymorphic Video Game <br>12.3 Relationships Among Objects in an Inheritance Hierarchy <br>12.3.1 Invoking Base-Class Functions from Derived-Class Objects <br>12.3.2 Aiming Derived-Class Pointers at Base-Class Objects <br>12.3.3 Derived-Class Member-Function Calls via Base-Class Pointers <br>12.4 Virtual Functions and Virtual Destructors <br>12.4.1 Why virtual Functions Are Useful <br>12.4.2 Declaring virtual Functions <br>12.4.3 Invoking a virtual Function Through a Base-Class Pointer or Reference <br>12.4.4 Invoking a virtual Function Through an Object’s Name <br>12.4.5 virtual Functions in the CommissionEmployee Hierarchy <br>12.4.6 virtual Destructors <br>12.4.7 C++11: final Member Functions and Classes <br>12.5 Type Fields and switch Statements <br>12.6 Abstract Classes and Pure virtual Functions <br>12.6.1 Pure virtual Functions <br>12.6.2 Device Drivers: Polymorphism in Operating Systems <br>12.7 Case Study: Payroll System Using Polymorphism <br>12.7.1 Creating Abstract Base Class Employee <br>12.7.2 Creating Concrete Derived Class SalariedEmployee <br>12.7.3 Creating Concrete Derived Class CommissionEmployee <br>12.7.4 Creating Indirect Concrete Derived Class BasePlusCommissionEmployee <br>12.7.5 Demonstrating Polymorphic Processing <br>12.8 (Optional) Polymorphism, Virtual Functions and Dynamic Binding “Under the Hood” <br>12.9 Case Study: Payroll System Using Polymorphism and Runtime Type Information with Downcasting, dynamic_cast, typeid and type_info 567 <br>12.10 Wrap-Up <br> <br>13 Stream Input/Output: A Deeper Look <br>13.1 Introduction <br>13.2 Streams <br>13.2.1 Classic Streams vs. Standard Streams <br>13.2.2 iostream Library Headers <br>13.2.3 Stream Input/Output Classes and Objects <br>13.3 Stream Output <br>13.3.1 Output of char* Variables <br>13.3.2 Character Output Using Member Function put <br>13.4 Stream Input <br>13.4.1 get and getline Member Functions <br>13.4.2 istream Member Functions peek, putback and ignore <br>13.4.3 Type-Safe I/O <br>13.5 Unformatted I/O Using read, write and gcount <br>13.6 Stream Manipulators: A Deeper Look <br>13.6.1 Integral Stream Base: dec, oct, hex and setbase <br>13.6.2 Floating-Point Precision (precision, setprecision) <br>13.6.3 Field Width (width, setw) <br>13.6.4 User-Defined Output Stream Manipulators <br>13.7 Stream Format States and Stream Manipulators <br>13.7.1 Trailing Zeros and Decimal Points (showpoint) <br>13.7.2 Justification (left, right and internal) <br>13.7.3 Padding (fill, setfill) <br>13.7.4 Integral Stream Base (dec, oct, hex, showbase) <br>13.7.5 Floating-Point Numbers; Scientific and Fixed Notation (scientific, fixed) <br>13.7.6 Uppercase/Lowercase Control (uppercase) <br>13.7.7 Specifying Boolean Format (boolalpha) <br>13.7.8 Setting and Resetting the Format State via Member Function flags <br>13.8 Stream Error States <br>13.9 Tying an Output Stream to an Input Stream <br>13.10 Wrap-Up <br> <br>14 File Processing <br>14.1 Introduction <br>14.2 Files and Streams <br>14.3 Creating a Sequential File <br>14.3.1 Opening a File <br>14.3.2 Opening a File via the open Member Function <br>14.3.3 Testing Whether a File Was Opened Successfully <br>14.3.4 Overloaded bool Operator <br>14.3.5 Processing Data <br>14.3.6 Closing a File <br>14.3.7 Sample Execution <br>14.4 Reading Data from a Sequential File <br>14.4.1 Opening a File for Input <br>14.4.2 Reading from the File <br>14.4.3 File-Position Pointers <br>14.4.4 Case Study: Credit Inquiry Program <br>14.5 C++14: Reading and Writing Quoted Text <br>14.6 Updating Sequential Files <br>14.7 Random-Access Files <br>14.8 Creating a Random-Access File <br>14.8.1 Writing Bytes with ostream Member Function write <br>14.8.2 Converting Between Pointer Types with the reinterpret_cast Operator <br>14.8.3 Credit-Processing Program <br>14.8.4 Opening a File for Output in Binary Mode <br>14.9 Writing Data Randomly to a Random-Access File <br>14.9.1 Opening a File for Input and Output in Binary Mode <br>14.9.2 Positioning the File-Position Pointer <br>14.10 Reading from a Random-Access File Sequentially <br>14.11 Case Study: A Transaction-Processing Program <br>14.12 Object Serialization <br>14.13 Wrap-Up <br> <br>15 Standard Library Containers and Iterators <br>15.1 Introduction <br>15.2 Introduction to Containers <br>15.3 Introduction to Iterators <br>15.4 Introduction to Algorithms <br>15.5 Sequence Containers <br>15.5.1 vector Sequence Container <br>15.5.2 list Sequence Container <br>15.5.3 deque Sequence Container <br>15.6 Associative Containers <br>15.6.1 multiset Associative Container <br>15.6.2 set Associative Container <br>15.6.3 multimap Associative Container <br>15.6.4 map Associative Container <br>15.7 Container Adapters <br>15.7.1 stack Adapter <br>15.7.2 queue Adapter <br>15.7.3 priority_queue Adapter <br>15.8 Class bitset <br>15.9Wrap-Up <br> <br>16 Standard Library Algorithms <br>16.1 Introduction <br>16.2 Minimum Iterator Requirements <br>16.3 Lambda Expressions <br>16.3.1 Algorithm for_each <br>16.3.2 Lambda with an Empty Introducer <br>16.3.3 Lambda with a Nonempty Introducer–Capturing Local Variables <br>16.3.4 Lambda Return Types <br>16.4Algorithms <br>16.4.1 fill, fill_n, generate and generate_n <br>16.4.2 equal, mismatch and lexicographical_compare <br>16.4.3 remove, remove_if, remove_copy and remove_copy_if <br>16.4.4 replace, replace_if, replace_copy and replace_copy_if <br>16.4.5 Mathematical Algorithms <br>16.4.6 Basic Searching and Sorting Algorithms <br>16.4.7 swap, iter_swap and swap_ranges <br>16.4.8 copy_backward, merge, unique and reverse <br>16.4.9 inplace_merge, unique_copy and reverse_copy <br>16.4.10 Set Operations <br>16.4.11 lower_bound, upper_bound and equal_range <br>16.4.12 min, max, minmax and minmax_element <br>16.5 Function Objects <br>16.6 Standard Library Algorithm Summary <br>16.7Wrap-Up <br> <br> 17 Exception Handling: A Deeper Look <br>17.1 Introduction <br>17.2 Exception-Handling Flow of Control; Defining an Exception Class <br>17.2.1 Defining an Exception Class to Represent the Type of Problem That Might Occur <br>17.2.2 Demonstrating Exception Handling <br>17.2.3 Enclosing Code in a try Block <br>17.2.4 Defining a catch Handler to Process a DivideByZeroException <br>17.2.5 Termination Model of Exception Handling <br>17.2.6 Flow of Program Control When the User Enters a Nonzero Denominator <br>17.2.7 Flow of Program Control When the User Enters a Denominator of Zero <br>17.3 Rethrowing an Exception <br>17.4 Stack Unwinding <br>17.5 When to Use Exception Handling <br>17.6 noexcept: Declaring Functions That Do Not Throw Exceptions <br>17.7 Constructors, Destructors and Exception Handling <br>17.7.1 Destructors Called Due to Exceptions <br>17.7.2 Initializing Local Objects to Acquire Resources <br>17.8 Processing new Failures <br>17.8.1 new Throwing bad_alloc on Failure <br>17.8.2 new Returning nullptr on Failure <br>17.8.3 Handling new Failures Using Function set_new_handler <br>17.9 Class unique_ptr and Dynamic Memory Allocation <br>17.9.1 unique_ptr Ownership <br>17.9.2 unique_ptr to a Built-In Array <br>17.10 Standard Library Exception Hierarchy <br>17.11 Wrap-Up <br> <br> 18 Introduction to Custom Templates <br>18.1 Introduction <br>18.2 Class Templates <br>18.2.1 Creating Class Template Stack <br>18.2.2 Class Template Stack’s Data Representation <br>18.2.3 Class Template Stack’s Member Functions <br>18.2.4 Declaring a Class Template’s Member Functions Outside the Class Template Definition <br>18.2.5 Testing Class Template Stack <br>18.3 Function Template to Manipulate a Class-Template Specialization Object <br>18.4 Nontype Parameters <br>18.5 Default Arguments for Template Type Parameters <br>18.6 Overloading Function Templates <br>18.7 Wrap-Up <br> <br> 19 Custom Templatized Data Structures <br>19.1 Introduction <br>19.1.1 Always Prefer the Standard Library’s Containers, Iterators and Algorithms, if Possible <br>19.1.2 Special Section: Building Your Own Compiler <br>19.2 Self-Referential Classes <br>19.3 Linked Lists <br>19.3.1 Testing Our Linked List Implementation <br>19.3.2 Class Template ListNode <br>19.3.3 Class Template List <br>19.3.4 Member Function insertAtFront <br>19.3.5 Member Function insertAtBack <br>19.3.6 Member Function removeFromFront <br>19.3.7 Member Function removeFromBack <br>19.3.8 Member Function print <br>19.3.9 Circular Linked Lists and Double Linked Lists <br>19.4 Stacks <br>19.4.1 Taking Advantage of the Relationship Between Stack and List <br>19.4.2 Implementing a Class Template Stack Class Based By Inheriting from List <br>19.4.3 Dependent Names in Class Templates <br>19.4.4 Testing the Stack Class Template <br>19.4.5 Implementing a Class Template Stack Class With Composition of a List Object <br>19.5 Queues <br>19.5.1 Applications of Queues <br>19.5.2 Implementing a Class Template Queue Class Based By Inheriting from List <br>19.5.3 Testing the Queue Class Template <br>19.6 Trees <br>19.6.1 Basic Terminology <br>19.6.2 Binary Search Trees <br>19.6.3 Testing the Tree Class Template <br>19.6.4 Class Template TreeNode <br>19.6.5 Class Template Tree <br>19.6.6 Tree Member Function insertNodeHelper <br>19.6.7 Tree Traversal Functions <br>19.6.8 Duplicate Elimination <br>19.6.9 Overview of the Binary Tree Exercises <br>19.7 Wrap-Up <br> <br>20 Searching and Sorting <br>20.1 Introduction <br>20.2 Searching Algorithms <br>20.2.1 Linear Search <br>20.2.2 Binary Search <br>20.3 Sorting Algorithms <br>20.3.1 Insertion Sort <br>20.3.2 Selection Sort <br>20.3.3 Merge Sort (A Recursive Implementation) <br>20.4Wrap-Up <br> <br>21 Class string and String Stream Processing: A Deeper Look <br>21.1 Introduction <br>21.2 string Assignment and Concatenation <br>21.3 Comparing strings <br>21.4 Substrings <br>21.5 Swapping strings <br>21.6 string Characteristics <br>21.7 Finding Substrings and Characters in a string <br>21.8 Replacing Characters in a string <br>21.9 Inserting Characters into a string <br>21.10 Conversion to Pointer-Based char* Strings <br>21.11 Iterators <br>21.12 String Stream Processing <br>21.13 C++11 Numeric Conversion Functions <br>21.14 Wrap-Up <br> <br> 22 Bits, Characters, C Strings and structs <br>22.1 Introduction <br>22.2 Structure Definitions <br>22.3 typedef and using <br>22.4 Example: Card Shuffling and Dealing Simulation <br>22.5 Bitwise Operators <br>22.6 Bit Fields <br>22.7 Character-Handling Library <br>22.8 C String-Manipulation Functions <br>22.9 C String-Conversion Functions <br>22.10 Search Functions of the C String-Handling Library <br>22.11 Memory Functions of the C String-Handling Library <br>22.12 Wrap-Up <br> <br>Chapters on the Web <br>A Operator Precedence and Associativity <br>B ASCII Character Set <br>C Fundamental Types <br>D Number Systems <br>D.1 Introduction <br>D.2 Abbreviating Binary Numbers as Octal and Hexadecimal Numbers <br>D.3 Converting Octal and Hexadecimal Numbers to Binary Numbers <br>D.4 Converting from Binary, Octal or Hexadecimal to Decimal <br>D.5 Converting from Decimal to Binary, Octal or Hexadecimal <br>D.6 Negative Binary Numbers: Two’s Complement Notation <br>E Preprocessor <br>E.1 Introduction <br>E.2 #include Preprocessing Directive <br>E.3 #define Preprocessing Directive: Symbolic Constants <br>E.4 #define Preprocessing Directive: Macros <br>E.5 Conditional Compilation <br>E.6 #error and #pragma Preprocessing Directives <br>E.7 Operators # and ## <br>E.8 Predefined Symbolic Constants <br>E.9 Assertions <br>E.10 Wrap-Up <br>Appendices on the Web <br>Index <br> <br>Chapters 23—26 and Appendices F—J are PDF documents posted online at the book’s password-protected Companion Website, which is accessible from http://www.pearsonhighered.com/deitel. <br>23 Other Topics <br>24 C++11 and C++14: Additional Features <br>25 ATM Case Study, Part 1: Object-Oriented Design with the UM <br>26 ATM Case Study, Part 2: Implementing an Object-Oriented Design <br> <br>F C Legacy Code Topics <br>G UML: Additional Diagram Types <br>H Using the Visual Studio Debugger <br>I Using the GNU C++ Debugger <br>J Using the Xcode Debugger <p style="margin:0px;">&nbsp;</p>

Managementboek Top 100

Rubrieken

Populaire producten

    Personen

      Trefwoorden

        C++ How to Program (Early Objects Version) (2-downloads)