Formatted contents note |
1 Introduction to Computers, the Internet and the World Wide Web 1 <br/>1.1 Introduction 2 <br/>1.2 Computers: Hardware and Software 3 <br/>1.3 Computer Organization 4 <br/>1.4 Personal, Distributed and Client/Server Computing 5 <br/>1.5 The Internet and the World Wide Web 6 <br/>1.6 Web 2.0 6 <br/>1.7 Machine Languages, Assembly Languages and High-Level Languages 7 <br/>1.8 History of C and C++ 8 <br/>1.9 C++ Standard Library 9 <br/>1.10 History of Java 10 <br/>1.11 Fortran, COBOL, Pascal and Ada 11 <br/>1.12 BASIC, Visual Basic, Visual C++, C# and .NET 11 <br/>1.13 Key Software Trend: Object Technology 12 <br/>1.14 Typical C++ Development Environment 13 <br/>1.15 Notes About C++ and C++ How to Program, 7/e 15 <br/>1.16 Test-Driving a C++ Application 16 <br/>1.17 Software Technologies 22 <br/>1.18 Future of C++: Open Source Boost Libraries, TR1 and C++0x 23 <br/>1.19 Software Engineering Case Study: Introduction to Object Technology and the UML 24 <br/>1.20 Wrap-Up 28 <br/>1.21 Web Resources 29 <br/>2 Introduction to C++ Programming 39 <br/>2.1 Introduction 40 <br/>2.2 First Program in C++: Printing a Line of Text 40 <br/>2.3 Modifying Our First C++ Program 44 <br/>2.4 Another C++ Program: Adding Integers 45 <br/>2.5 Memory Concepts 49 <br/>2.6 Arithmetic 50 <br/>2.7 Decision Making: Equality and Relational Operators 54 <br/>2.8 Wrap-Up 58 <br/>3 Introduction to Classes and Objects 68 <br/>3.1 Introduction 69 <br/>3.2 Classes, Objects, Member Functions and Data Members 69 <br/>3.3 Defining a Class with a Member Function 71 <br/>3.4 Defining a Member Function with a Parameter 74 <br/>3.5 Data Members, set Functions and get Functions 77 <br/>3.6 Initializing Objects with Constructors 84 <br/>3.7 Placing a Class in a Separate File for Reusability 87 <br/>3.8 Separating Interface from Implementation 91 <br/>3.9 Validating Data with set Functions 97 <br/>3.10 Wrap-Up 102 <br/>4 Control Statements: Part 1 109 <br/>4.1 Introduction 110 <br/>4.2 Algorithms 110 <br/>4.3 Pseudocode 111 <br/>4.4 Control Structures 112 <br/>4.5 if Selection Statement 115 <br/>4.6 if…else Double-Selection Statement 117 <br/>4.7 while Repetition Statement 122 <br/>4.8 Formulating Algorithms: Counter-Controlled Repetition 123 <br/>4.9 Formulating Algorithms: Sentinel-Controlled Repetition 129 <br/>4.10 Formulating Algorithms: Nested Control Statements 139 <br/>4.11 Assignment Operators 144 <br/>4.12 Increment and Decrement Operators 144 <br/>4.13 Wrap-Up 148 <br/>5 Control Statements: Part 2 163 <br/>5.1 Introduction 164 <br/>5.2 Essentials of Counter-Controlled Repetition 164 <br/>5.3 for Repetition Statement 166 <br/>5.4 Examples Using the for Statement 170 <br/>5.5 do…while Repetition Statement 174 <br/>5.6 switch Multiple-Selection Statement 176 <br/>5.7 break and continue Statements 185 <br/>5.8 Logical Operators 187 <br/>5.9 Confusing the Equality (==) and Assignment (=) Operators 191 <br/>5.10 Structured Programming Summary 192 <br/>5.11 Wrap-Up 197 <br/><br/>6 Functions and an Introduction to Recursion 207 <br/>6.1 Introduction 208 <br/>6.2 Program Components in C++ 209 <br/>6.3 Math Library Functions 210 <br/>6.4 Function Definitions with Multiple Parameters 211 <br/>6.5 Function Prototypes and Argument Coercion 216 <br/>6.6 C++ Standard Library Header Files 218 <br/>6.7 Case Study: Random Number Generation 220 <br/>6.8 Case Study: Game of Chance; Introducing enum 225 <br/>6.9 Storage Classes 229 <br/>6.10 Scope Rules 231 <br/>6.11 Function Call Stack and Activation Records 235 <br/>6.12 Functions with Empty Parameter Lists 238 <br/>6.13 Inline Functions 239 <br/>6.14 References and Reference Parameters 241 <br/>6.15 Default Arguments 245 <br/>6.16 Unary Scope Resolution Operator 247 <br/>6.17 Function Overloading 248 <br/>6.18 Function Templates 251 <br/>6.19 Recursion 253 <br/>6.20 Example Using Recursion: Fibonacci Series 256 <br/>6.21 Recursion vs. Iteration 259 <br/>6.22 Wrap-Up 262 <br/>7 Arrays and Vectors 282 <br/>7.1 Introduction 283 <br/>7.2 Arrays 284 <br/>7.3 Declaring Arrays 285 <br/>7.4 Examples Using Arrays 286 <br/>7.4.1 Declaring an Array and Using a Loop to Initialize the Array’s Elements 286 <br/>7.4.2 Initializing an Array in a Declaration with an Initializer List 287 <br/>7.4.3 Specifying an Array’s Size with a Constant Variable and Setting Array Elements with Calculations 288 <br/>7.4.4 Summing the Elements of an Array 291 <br/>7.4.5 Using Bar Charts to Display Array Data Graphically 291 <br/>7.4.6 Using the Elements of an Array as Counters 293 <br/>7.4.7 Using Arrays to Summarize Survey Results 294 <br/>7.4.8 Static Local Arrays and Automatic Local Arrays 297 <br/>7.5 Passing Arrays to Functions 299 <br/>7.6 Case Study: Class GradeBook Using an Array to Store Grades 303 <br/>7.7 Searching Arrays with Linear Search 309 <br/>7.8 Sorting Arrays with Insertion Sort 311 <br/>7.9 Multidimensional Arrays 313 <br/>7.10 Case Study: Class GradeBook Using a Two-Dimensional Array 316 <br/>7.11 Introduction to C++ Standard Library Class Template vector 323 <br/>7.12 Wrap-Up 328 <br/>8 Pointers 345 <br/>8.1 Introduction 346 <br/>8.2 Pointer Variable Declarations and Initialization 346 <br/>8.3 Pointer Operators 348 <br/>8.4 Pass-by-Reference with Pointers 350 <br/>8.5 Using const with Pointers 354 <br/>8.6 Selection Sort Using Pass-by-Reference 358 <br/>8.7 sizeof Operator 362 <br/>8.8 Pointer Expressions and Pointer Arithmetic 365 <br/>8.9 Relationship Between Pointers and Arrays 367 <br/>8.10 Pointer-Based String Processing 370 <br/>8.11 Arrays of Pointers 373 <br/>8.12 Function Pointers 374 <br/>8.13 Wrap-Up 377 <br/>9 Classes: A Deeper Look, Part 1 395 <br/>9.1 Introduction 396 <br/>9.2 Time Class Case Study 397 <br/>9.3 Class Scope and Accessing Class Members 403 <br/>9.4 Separating Interface from Implementation 405 <br/>9.5 Access Functions and Utility Functions 406 <br/>9.6 Time Class Case Study: Constructors with Default Arguments 409 <br/>9.7 Destructors 414 <br/>9.8 When Constructors and Destructors Are Called 415 <br/>9.9 Time Class Case Study: A Subtle Trap–Returning a Reference to a private Data Member 418 <br/>9.10 Default Memberwise Assignment 421 <br/>9.11 Wrap-Up 423 <br/>10 Classes: A Deeper Look, Part 2 429 <br/>10.1 Introduction 430 <br/>10.2 const (Constant) Objects and const Member Functions 430 <br/>10.3 Composition: Objects as Members of Classes 439 <br/>10.4 friend Functions and friend Classes 445 <br/>10.5 Using the this Pointer 448 <br/>10.6 static Class Members 453 <br/>10.7 Data Abstraction and Information Hiding 458 <br/>10.8 Wrap-Up 460 <br/>11 Operator Overloading 466 <br/>11.1 Introduction 467 <br/>11.2 Fundamentals of Operator Overloading 468 <br/>11.3 Restrictions on Operator Overloading 469 <br/>11.4 Operator Functions as Class Members vs. Global Functions 470 <br/>11.5 Overloading Stream Insertion and Stream Extraction Operators 472 <br/>11.6 Overloading Unary Operators 475 <br/>11.7 Overloading Binary Operators 476 <br/>11.8 Dynamic Memory Management 476 <br/>11.9 Case Study: Array Class 478 <br/>11.10 Converting between Types 490 <br/>11.11 Building a String Class 491 <br/>11.12 Overloading ++ and -- 492 <br/>11.13 Case Study: A Date Class 494 <br/>11.14 Standard Library Class string 498 <br/>11.15 explicit Constructors 502 <br/>11.16 Proxy Classes 505 <br/>11.17 Wrap-Up 509 <br/>12 Object-Oriented Programming: Inheritance 521 <br/>12.1 Introduction 522 <br/>12.2 Base Classes and Derived Classes 523 <br/>12.3 protected Members 526 <br/>12.4 Relationship between Base Classes and Derived Classes 526 <br/>12.4.1 Creating and Using a CommissionEmployee Class 527 <br/>12.4.2 Creating a BasePlusCommissionEmployee Class Without Using Inheritance 532 <br/>12.4.3 Creating a CommissionEmployee—BasePlusCommissionEmployee Inheritance Hierarchy 537 <br/>12.4.4 CommissionEmployee—BasePlusCommissionEmployee Inheritance Hierarchy Using protected Data 542 <br/>12.4.5 CommissionEmployee—BasePlusCommissionEmployee Inheritance Hierarchy Using private Data 549 <br/>12.5 Constructors and Destructors in Derived Classes 556 <br/>12.6 public, protected and private Inheritance 564 <br/>12.7 Software Engineering with Inheritance 565 <br/>12.8 Wrap-Up 566 <br/>13 Object-Oriented Programming: Polymorphism 572 <br/>13.1 Introduction 573 <br/>13.2 Polymorphism Examples 574 <br/>13.3 Relationships Among Objects in an Inheritance Hierarchy 575 <br/>13.3.1 Invoking Base-Class Functions from Derived-Class Objects 576 <br/>13.3.2 Aiming Derived-Class Pointers at Base-Class Objects 583 <br/>13.3.3 Derived-Class Member-Function Calls via Base-Class Pointers 584 <br/>13.3.4 Virtual Functions 586 <br/>13.3.5 Summary of the Allowed Assignments Between Base-Class and Derived-Class Objects and Pointers 592 <br/>13.4 Type Fields and switch Statements 593 <br/>13.5 Abstract Classes and Pure virtual Functions 593 <br/>13.6 Case Study: Payroll System Using Polymorphism 595 <br/>13.6.1 Creating Abstract Base Class Employee 597 <br/>13.6.2 Creating Concrete Derived Class SalariedEmployee 600 <br/>13.6.3 Creating Concrete Derived Class HourlyEmployee 602 <br/>13.6.4 Creating Concrete Derived Class CommissionEmployee 605 <br/>13.6.5 Creating Indirect Concrete Derived Class BasePlusCommissionEmployee 607 <br/>13.6.6 Demonstrating Polymorphic Processing 608 <br/>13.7 (Optional) Polymorphism, Virtual Functions and Dynamic Binding “Under the Hood” 612 <br/>13.8 Case Study: Payroll System Using Polymorphism and Runtime Type Information with Downcasting, dynamic_cast, typeid and type_info 616 <br/>13.9 Virtual Destructors 620 <br/>13.10 Wrap-Up 620 <br/>14 Templates 626 <br/>14.1 Introduction 627 <br/>14.2 Function Templates 628 <br/>14.3 Overloading Function Templates 631 <br/>14.4 Class Templates 631 <br/>14.5 Nontype Parameters and Default Types for Class Templates 638 <br/>14.6 Notes on Templates and Inheritance 639 <br/>14.7 Notes on Templates and Friends 639 <br/>14.8 Notes on Templates and static Members 640 <br/>14.9 Wrap-Up 640 <br/>15 Stream Input/Output 645 <br/>15.1 Introduction 646 <br/>15.2 Streams 647 <br/>15.2.1 Classic Streams vs. Standard Streams 647 <br/>15.2.2 iostream Library Header Files 648 <br/>15.2.3 Stream Input/Output Classes and Objects 648 <br/>15.3 Stream Output 651 <br/>15.3.1 Output of char * Variables 651 <br/>15.3.2 Character Output Using Member Function put 651 <br/>15.4 Stream Input 652 <br/>15.4.1 get and getline Member Functions 652 <br/>15.4.2 istream Member Functions peek, putback and ignore 655 <br/>15.4.3 Type-Safe I/O 655 <br/>15.5 Unformatted I/O Using read, write and gcount 655 <br/>15.6 Introduction to Stream Manipulators 656 <br/>15.6.1 Integral Stream Base: dec, oct, hex and setbase 657 <br/>15.6.2 Floating-Point Precision (precision, setprecision) 658 <br/>15.6.3 Field Width (width, setw) 659 <br/>15.6.4 User-Defined Output Stream Manipulators 660 <br/>15.7 Stream Format States and Stream Manipulators 662 <br/>15.7.1 Trailing Zeros and Decimal Points (showpoint) 662 <br/>15.7.2 Justification (left, right and internal) 663 <br/>15.7.3 Padding (fill, setfill) 665 <br/>15.7.4 Integral Stream Base (dec, oct, hex, showbase) 666 <br/>15.7.5 Floating-Point Numbers; Scientific and Fixed Notation (scientific, fixed) 667 <br/>15.7.6 Uppercase/Lowercase Control (uppercase) 668 <br/>15.7.7 Specifying Boolean Format (boolalpha) 668 <br/>15.7.8 Setting and Resetting the Format State via Member Function flags 669 <br/>15.8 Stream Error States 671 <br/>15.9 Tying an Output Stream to an Input Stream 673 <br/>15.10 Wrap-Up 673 <br/>16 Exception Handling 683 <br/>16.1 Introduction 684 <br/>16.2 Exception-Handling Overview 685 <br/>16.3 Example: Handling an Attempt to Divide by Zero 685 <br/>16.4 When to Use Exception Handling 691 <br/>16.5 Rethrowing an Exception 692 <br/>16.6 Exception Specifications 694 <br/>16.7 Processing Unexpected Exceptions 695 <br/>16.8 Stack Unwinding 695 <br/>16.9 Constructors, Destructors and Exception Handling 697 <br/>16.10 Exceptions and Inheritance 698 <br/>16.11 Processing new Failures 698 <br/>16.12 Class auto_ptr and Dynamic Memory Allocation 701 <br/>16.13 Standard Library Exception Hierarchy 703 <br/>16.14 Other Error-Handling Techniques 705 <br/>16.15 Wrap-Up 706 <br/>17 File Processing 713 <br/>17.1 Introduction 714 <br/>17.2 Data Hierarchy 714 <br/>17.3 Files and Streams 716 <br/>17.4 Creating a Sequential File 717 <br/>17.5 Reading Data from a Sequential File 721 <br/>17.6 Updating Sequential Files 726 <br/>17.7 Random-Access Files 727 <br/>17.8 Creating a Random-Access File 728 <br/>17.9 Writing Data Randomly to a Random-Access File 733 <br/>17.10 Reading from a Random-Access File Sequentially 735 <br/>17.11 Case Study: A Transaction-Processing Program 737 <br/>17.12 Overview of Object Serialization 743 <br/>17.13 Wrap-Up 744 <br/>18 Class string and String Stream Processing 755 <br/>18.1 Introduction 756 <br/>18.2 string Assignment and Concatenation 757 <br/>18.3 Comparing strings 759 <br/>18.4 Substrings 762 <br/>18.5 Swapping strings 762 <br/>18.6 string Characteristics 763 <br/>18.7 Finding Substrings and Characters in a string 766 <br/>18.8 Replacing Characters in a string 768 <br/>18.9 Inserting Characters into a string 769 <br/>18.10 Conversion to C-Style Pointer-Based char * Strings 770 <br/>18.11 Iterators 772 <br/>18.12 String Stream Processing 773 <br/>18.13 Wrap-Up 776 <br/>19 Searching and Sorting 784 <br/>19.1 Introduction 785 <br/>19.2 Searching Algorithms 786 <br/>19.2.1 Efficiency of Linear Search 786 <br/>19.2.2 Binary Search 788 <br/>19.3 Sorting Algorithms 793 <br/>19.3.1 Efficiency of Selection Sort 793 <br/>19.3.2 Efficiency of Insertion Sort 793 <br/>19.3.3 Merge Sort (A Recursive Implementation) 794 <br/>19.4 Wrap-Up 801 <br/>20 Data Structures 806 <br/>20.1 Introduction 807 <br/>20.2 Self-Referential Classes 808 <br/>20.3 Dynamic Memory Allocation and Data Structures 809 <br/>20.4 Linked Lists 809 <br/>20.5 Stacks 824 <br/>20.6 Queues 829 <br/>20.7 Trees 832 <br/>20.8 Wrap-Up 841 <br/>21 Bits, Characters, C Strings and structs 852 <br/>21.1 Introduction 853 <br/>21.2 Structure Definitions 853 <br/>21.3 Initializing Structures 856 <br/>21.4 Using Structures with Functions 856 <br/>21.5 typedef 856 <br/>21.6 Example: Card Shuffling and Dealing Simulation 857 <br/>21.7 Bitwise Operators 860 <br/>21.8 Bit Fields 869 <br/>21.9 Character-Handling Library 873 <br/>21.10 Pointer-Based String Manipulation Functions 878 <br/>21.11 Pointer-Based String-Conversion Functions 885 <br/>21.12 Search Functions of the Pointer-Based String-Handling Library 890 <br/>21.13 Memory Functions of the Pointer-Based String-Handling Library 895 <br/>21.14 Wrap-Up 899 <br/>22 Standard Template Library (STL) 916 <br/>22.1 Introduction to the Standard Template Library (STL) 917 <br/>22.1.1 Introduction to Containers 919 <br/>22.1.2 Introduction to Iterators 923 <br/>22.1.3 Introduction to Algorithms 928 <br/>22.2 Sequence Containers 930 <br/>22.2.1 vector Sequence Container 930 <br/>22.2.2 list Sequence Container 938 <br/>22.2.3 deque Sequence Container 942 <br/>22.3 Associative Containers 944 <br/>22.3.1 multiset Associative Container 944 <br/>22.3.2 set Associative Container 947 <br/>22.3.3 multimap Associative Container 948 <br/>22.3.4 map Associative Container 950 <br/>22.4 Container Adapters 952 <br/>22.4.1 stack Adapter 952 <br/>22.4.2 queue Adapter 954 <br/>22.4.3 priority_queue Adapter 955 <br/>22.5 Algorithms 957 <br/>22.5.1 fill, fill_n, generate and generate_n 958 <br/>22.5.2 equal, mismatch and lexicographical_compare 959 <br/>22.5.3 remove, remove_if, remove_copy and remove_copy_if 962 <br/>22.5.4 replace, replace_if, replace_copy and replace_copy_if 964 <br/>22.5.5 Mathematical Algorithms 967 <br/>22.5.6 Basic Searching and Sorting Algorithms 970 <br/>22.5.7 swap, iter_swap and swap_ranges 972 <br/>22.5.8 copy_backward, merge, unique and reverse 973 <br/>22.5.9 inplace_merge, unique_copy and reverse_copy 976 <br/>22.5.10 Set Operations 977 <br/>22.5.11 lower_bound, upper_bound and equal_range 980 <br/>22.5.12 Heapsort 982 <br/>22.5.13 min and max 985 <br/>22.5.14 STL Algorithms Not Covered in This Chapter 986 <br/>22.6 Class bitset 987 <br/>22.7 Function Objects 991 <br/>22.8 Wrap-Up 994 <br/>22.9 STL Web Resources 995 <br/>Chapters on the Web 1005 <br/>Chapters 23—27 are PDF documents posted online at the book’s Companion Website (located at www.pearsonhighered.com/deitel). <br/>23 Boost Libraries, Technical Report 1 and C++0x I <br/>23.1 Introduction II <br/>23.2 Deitel Online C++ and Related Resource Centers II <br/>23.3 Boost Libraries II <br/>23.4 Boost Libraries Overview III <br/>23.5 Regular Expressions with the Boost.Regex Library VI <br/>23.5.1 Regular Expression Example VI <br/>23.5.2 Validating User Input with Regular Expressions IX <br/>23.5.3 Replacing and Splitting Strings XII <br/>23.6 Smart Pointers with Boost.Smart_ptr XIV <br/>23.6.1 Reference Counted shared_ptr XIV <br/>23.6.2 weak_ptr: shared_ptr Observer XIX <br/>23.7 Technical Report 1 XXIV <br/>23.8 C++0x XXVI <br/>23.9 Core Language Changes XXVI <br/>23.10 Wrap-Up XXXI <br/>24 Other Topics XL <br/>24.1 Introduction XLI <br/>24.2 const_cast Operator XLI <br/>24.3 mutable Class Members XLIII <br/>24.4 namespaces XLV <br/>24.5 Operator Keywords XLVIII <br/>24.6 Pointers to Class Members (.* and ->*) L <br/>24.7 Multiple Inheritance LII <br/>24.8 Multiple Inheritance and virtual Base Classes LVII <br/>24.9 Wrap-Up LXII <br/>25 ATM Case Study, Part 1: Object-Oriented Design with the UML LXVII <br/>25.1 Introduction LXVIII <br/>25.2 Examining the ATM Requirements Document LXVIII <br/>25.3 Identifying the Classes in the ATM Requirements Document LXXVI <br/>25.4 Identifying Class Attributes LXXXIII <br/>25.5 Identifying Objects’ States and Activities LXXXVII <br/>25.6 Identifying Class Operations XCI <br/>25.7 Indicating Collaboration Among Objects XCVIII <br/>25.8 Wrap-Up CV <br/>26 ATM Case Study, Part 2: Implementing an Object-Oriented Design CIX <br/>26.1 Introduction CX <br/>26.2 Starting to Program the Classes of the ATM System CX <br/>26.3 Incorporating Inheritance into the ATM System CXVII <br/>26.4 ATM Case Study Implementation CXXIV <br/>26.4.1 Class ATM CXXIV <br/>26.4.2 Class Screen CXXXII <br/>26.4.3 Class Keypad CXXXIII <br/>26.4.4 Class CashDispenser CXXXIV <br/>26.4.5 Class DepositSlot CXXXVI <br/>26.4.6 Class Account CXXXVII <br/>26.4.7 Class BankDatabase CXXXIX <br/>26.4.8 Class Transaction CXLIII <br/>26.4.9 Class BalanceInquiry CXLV <br/>26.4.10 Class Withdrawal CXLVII <br/>26.4.11 Class Deposit CLII <br/>26.4.12 Test Program ATMCaseStudy.cpp CLV <br/>26.5 Wrap-Up CLV <br/>27 Game Programming with Ogre CLVIII <br/>27.1 Introduction CLIX <br/>27.2 Installing Ogre, OgreAL and OpenAL CLIX <br/>27.3 Basics of Game Programming CLIX <br/>27.4 The Game of Pong: Code Walkthrough CLXII <br/>27.4.1 Ogre Initialization CLXIII <br/>27.4.2 Creating a Scene CLXXII <br/>27.4.3 Adding to the Scene CLXXIII <br/>27.4.4 Animation and Timers CLXXXV <br/>27.4.5 User Input CLXXXVI <br/>27.4.6 Collision Detection CLXXXVIII <br/>27.4.7 Sound CXCII <br/>27.4.8 Resources CXCIII <br/>27.4.9 Pong Driver CXCIV <br/>27.5 Wrap-Up CXCV <br/>27.6 Ogre Web Resources CXCV <br/><br/>A Operator Precedence and Associativity 1006 <br/>B ASCII Character Set 1008 <br/>C Fundamental Types 1009 <br/>D Number Systems 1011 <br/>D.1 Introduction 1012 <br/>D.2 Abbreviating Binary Numbers as Octal and Hexadecimal Numbers 1015 <br/>D.3 Converting Octal and Hexadecimal Numbers to Binary Numbers 1016 <br/>D.4 Converting from Binary, Octal or Hexadecimal to Decimal 1016 <br/>D.5 Converting from Decimal to Binary, Octal or Hexadecimal 1017 <br/>D.6 Negative Binary Numbers: Two’s Complement Notation 1019 <br/>E Preprocessor 1024 <br/>E.1 Introduction 1025 <br/>E.2 #include Preprocessor Directive 1025 <br/>E.3 #define Preprocessor Directive: Symbolic Constants 1026 <br/>E.4 #define Preprocessor Directive: Macros 1026 <br/>E.5 Conditional Compilation 1028 <br/>E.6 #error and #pragma Preprocessor Directives 1029 <br/>E.7 Operators # and ## 1030 <br/>E.8 Predefined Symbolic Constants 1030 <br/>E.9 Assertions 1031 <br/>E.10 Wrap-Up 1031 <br/>Appendices on the Web 1036 <br/>Appendices F—I are PDF documents posted online at the book’s Companion Website (located at www.pearsonhighered.com/deitel). <br/>F C Legacy Code Topics CCV <br/>F.1 Introduction CCVI <br/>F.2 Redirecting Input/Output on UNIX/Linux/Mac OS X and Windows Systems CCVI <br/>F.3 Variable-Length Argument Lists CCVII <br/>F.4 Using Command-Line Arguments CCIX <br/>F.5 Notes on Compiling Multiple-Source-File Programs CCXI <br/>F.6 Program Termination with exit and atexit CCXIII <br/>F.7 Type Qualifier volatile CCXIV <br/>F.8 Suffixes for Integer and Floating-Point Constants CCXIV <br/>F.9 Signal Handling CCXV <br/>F.10 Dynamic Memory Allocation with calloc and realloc CCXVII <br/>F.11 Unconditional Branch: goto CCXVIII <br/>F.12 Unions CCXIX <br/>F.13 Linkage Specifications CCXXII <br/>F.14 Wrap-Up CCXXIII <br/>G UML 2: Additional Diagram Types CCXXIX <br/>G.1 Introduction CCXXIX <br/>G.2 Additional Diagram Types CCXXIX <br/>H Using the Visual Studio Debugger CCXXXI <br/>H.1 Introduction CCXXXII <br/>H.2 Breakpoints and the Continue Command CCXXXII <br/>H.3 Locals and Watch Windows CCXXXVIII <br/>H.4 Controlling Execution Using the Step Into, Step Over, Step Out and Continue Commands CCXLI <br/>H.5 Autos Window CCXLIII <br/>H.6 Wrap-Up CCXLIV <br/>I Using the GNU C++ Debugger CCXLVII <br/>I.1 Introduction CCXLVIII <br/>I.2 Breakpoints and the run, stop, continue and print Commands CCXLVIII <br/>I.3 print and set Commands CCLIV <br/>I.4 Controlling Execution Using the step, finish and next Commands CCLVI <br/>I.5 watch Command CCLIX <br/>I.6 Wrap-Up CCLXI <br/>Index 1037 |