1 MOVING FROM C TO C++ 1.1 DIFFERENCES BETWEEN C AND C++ 1.1.1 THE C++ STANDARD AND COMPILERS 1.1.2 C++ COMMENTS 1.1.3 HEADER FILES 1.1.4 DATA TYPES 1.1.5 RESOLVING SCOPE AND VARIABLE DECLARATIONS 1.1.6 CONSTANTS 1.2 C++ INPUT/OUTPUT 1.2.1 C++ I/O METHODS 1.2.2 C++ FORMATTING 1.3 NAMESPACES 2 C++ FUNCTION ENHANCEMENTS 2.1 C++ PROTOTYPING 2.2 INLINE FUNCTIONS 2.2.1 USING C MACROS 2.2.2 USING INLINE FUNCTIONS 2.3 DEFAULT ARGUMENTS 2.4 FUNCTION OVERLOADING 2.5 FUNCTION TEMPLATES 3 POINTERS, REFERENCES, AND DYNAMIC MEMOPY ALLOCATION 3.1 C++ POINTERS 3.1.1 REVIEWING THE FUNDAMENTALS OF POINTERS 3.1.2 DIFFERENCES BETWEEN C AND C++ POINTERS 3.2 REFERENCES 3.2.1 REFERENCES AS INDEPENDENT VARIABLES 3.2.2 PASSING REFERENCES TO FUNCTIONS 3.2.3 RETURNING REFERENCES BY FUNCTIONS 3.3 USING REFERENCES AND POINTERS WITH CONSTANTS 3.4 DYNAMIC MEMORY ALLOCATION 3.4.1 STATIC VERSUS DYNAMIC MEMORY ALLOCATION 3.4.2 DYNAMIC ARRAYS 3.5 CASE STUDY: LOTTERY RANDOM NUMBER GENERATOR 4 CLASSES AND OBJECTS 4.1 PROCEDURAL VERSUS OBJECT-ORIENTED PROGRAMMING 4.2 C++ STRUCTURES VERSUS C STRUCTURES 4.3 CLASSES 4.3.1 ACCESSING CLASS MEMBERS 4.3.2 MEMBER FUNCTIONS 4.3.3 ALLOCATING OBJECTS AT RUN-TIME 4.4 CONSTRUCTOR AND DESTRUCTOR FUNCTIONS 4.4.1 CONSTRUCTORS 4.4.2 THE CLASS DESTRUCTOR 4.5 CASE STUDY: DATA ENCRYPTION 5 CLASSES: ADVANCED TOPICS 5.1 PASSING TO AND RETURNING OBJECTS FROM FUNCTIONS 5.2 COPY CONSTRUCTOR 5.3 FRIEND FUNCTIONS AND CLASSES 5.3.1 FRIEND FUNCTIONS 5.3.2 FRIEND CLASSES 5.4 STATIC MEMBERS 5.4.1 STATIC DATA MEMBERS 5.4.2 STATIC MEMBER FUNCTIONS 5.5 THE this POINTER 5.6 CONSTANT MEMBER FUNCTIONS 6 OPERATOR OVERLOADING 6.1 FUNDAMENTALS OF OPERATOR OVERLOADING 6.2 OPERATOR FUNCTIONS 6.3 OVERLOADING BINARY OPERATORS 6.4 OVERLOADING UNARY OPERATORS 6.5 OVERLOADING THE STREAM OPERATORS 6.6 CASE STUDY: AC CURRENT CALCULATOR 7 INHERITANCE 7.1 FUNDAMENTALS OF INHERITANCE 7.2 THE protected ACCESS SPECIFIER 7.3 CONSTRUCTING AND DESTROYING DERIVED CLASSES 7.4 MULTIPLE INHERITANCE 7.4.1 DIRECT MULTIPLE INHERITANCE 7.4.2 INDIRECT MULTIPLE INHERITANCE 7.5 DOMINATING AND OVERRIDING BASECLASS MEMBERS 8 COMPOSITION 8.1 COMPOSITION VERSUS INHERITANCE 8.2 USING COMPOSITION 8.3 CONSTRUCTING AND DESTROYING COMPOSED CLASSES 8.4 COMBINING INHERITANCE AND COMPOSITION 8.5 CASE STUDY: COMPUTER SYSTEM CONFIGURATOR 9 POLYMORPHISM AND VIRTUAL FUNCTIONS 9.1 DYNAMIC VERSUS STATIC BINDING 9.2 VIRTUAL FUNCTIONS 9.3 ABSTRACT BASE CLASSES 9.4 VIRTUAL DESTRUCTORS 9.5 USING POLYMORPHISM 9.6 CASE STUDY: LOGIC CIRCUIT CALCULATOR 10 TEMPLATES 10.1 CLASS TEMPLATES 10.1.1 Template Parameters 10.1.2 Member Functions of Class Templates 10.1.3 Using Friends and Static Members with Class Templates 10.1.4 Using the void Pointer 10.2 TEMPLATES AND INHERITANCE 10.3 CONTAINERS AND ITERATORS 10.3.1 Sequence Containers 10.3.2 Associative Containers 10.3.3 Iterators 10.4 STANDARD TEMPLATE LIBRARY (STL) 11 EXCEPTION HANDLING 11.1 FUNDAMENTALS OF EXCEPTION HANDLING 11.2 USING try-throw-catch 11.2.1 Throwing and Handling an Exception 11.2.2 Exception Specifications 11.3 HANDLING MEMORY ALLOCATION ERRORS 11.4 EXCEPTIONS AND CLASSES 12 FILE I/O 12.1 STEPS IN FILE I/O PROCESSING 12.1.1 Creating a File Object 12.1.2 Opening a File 12.1.3 Using a File 12.1.4 Closing a File 12.2 SEQUENTIAL FILES 12.3 RANDOM-ACCESS FILES APPENDIX A C++ KEYWORDS AND SYNONYMS APPENDIX B C++ OPERATORS APPENDIX C STANDARD C++ LIBRARY APPENDIX D STANDARD C++ ALGORITHMS APPENDIX E ANSWERS TO ODD-NUMBERED QUESTIONS