Power By Dholu Production

Responsive Ads Here

Wednesday, January 10, 2018

C++ Programing - World EBook Library | E-book


C++ Programing - World EBook Library | E-book
C++ Programing - World EBook Library | E-book


Contents

Contents............................................................................ vi
Preface .............................................................................xi
Intended Audience................................................... xi
Structure of the Book............................................... xii
1. Preliminaries............................................................... 1
Programming
A Simple C++ Program
Compiling a Simple C++ Program
How C++ Compilation Works
Variables
Simple Input/Output
Comments
Memory
Integer Numbers
Real Numbers
Characters
Strings
Names
Exercises
2. Expressions .................................................................................17
Arithmetic Operators
Relational Operators
Logical Operators
Bitwise Operators
Increment/Decrement Operators
Assignment Operator
Conditional Operator
Comma Operator
The sizeof Operator
Operator Precedence
Simple Type Conversion
Exercises
3. Statements................................................................................. 30
Simple and Compound Statements
The if Statement
The switch Statement
The while Statement
The do Statement
The for Statement
The continue Statement
The break Statement
The goto Statement
The return Statement
Exercises
4. Functions................................................................................... 45
A Simple Function
Parameters and Arguments
Global and Local Scope
Scope Operator
Auto Variables
Register Variables
Static Variables and Functions
Extern Variables and Functions
Symbolic Constants
Enumerations
Runtime Stack
Inline Functions
Recursion
Default Arguments
Variable Number of Arguments
Command Line Arguments
Exercises
5. Arrays, Pointers, and References.............................................. 65
Arrays
Multidimensional Arrays
Pointers
Dynamic Memory
Pointer Arithmetic
Function Pointers
References
Typedefs
Exercises
6. Classes.......................................................................................... 82
A Simple Class
Inline Member Functions
Example: A Set Class
Constructors
Destructors
Friends
Default Arguments
Implicit Member Argument
Scope Operator
Member Initialization List
Constant Members
Static Members
Member Pointers
References Members
Class Object Members
Object Arrays
Class Scope
Structures and Unions
Bit Fields
Exercises
7. Overloading .....................................................................................115
Function Overloading
Operator Overloading
Example: Set Operators
Type Conversion
Example: Binary Number Class
Overloading << for Output
Overloading >> for Input
Overloading []
Overloading ()
Memberwise Initialization
Memberwise Assignment
Overloading new and delete
Overloading ->, *, and &
Overloading ++ and --
Exercises
8. Derived Classes .................................................................................145
An illustrative Class
A Simple Derived Class
Class Hierarchy Notation
Constructors and Destructors
Protected Class Members
Private, Public, and Protected Base Classes
Virtual Functions
Multiple Inheritance
Ambiguity
Type Conversion
Inheritance and Class Object Members
Virtual Base Classes
Overloaded Operators
Exercises
9. Templates............................................................................................ 170
Function Template Definition
Function Template Instantiation
Example: Binary Search
Class Template Definition
Class Template Instantiation
Nontype Parameters
Class Template Specialization
Class Template Members
Class Template Friends
Example: Doubly-linked Lists
Derived Class Templates
Exercises
10. Exception Handling ...........................................................................188
Flow Control
The Throw Clause
The Try Block and Catch Clauses
Function Throw Lists
Exercises
11. The IO Library.................................................................................... 196
The Role of streambuf
Stream Output with ostream
Stream Input with istream
Using the ios Class
Stream Manipulators
File IO with fstreams
Array IO with strstreams
Example: Program Annotation
Exercises
12. The Preprocessor............................................................................... 218
Preprocessor Directives
Macro Definition
Quote and Concatenation Operators
File Inclusion
Conditional Compilation
Other Directives
Predefined Identifiers
Exercises