Download C++ PDF

TitleC++
File Size5.8 MB
Total Pages566
Table of Contents
                            The Context of Software Development
	Software
	Development Tools
	Learning Programming with C++
	Summary
	Exercises
Writing a C++ Program
	General Structure of a Simple C++ Program
	Compiling the source code
	Variations of our simple program
	Template for simple C++ programs
	Summary
	Exercises
Values and Variables
	Integer Values
	Variables and Assignment
	Identifiers
	Floating-point Types
	Constants
	Other Numeric Types
	Characters
	Enumerated Types
	Type Inference with auto
	Summary
	Exercises
Expressions and Arithmetic
	Expressions
	Mixed Type Expressions
	Operator Precedence and Associativity
	Comments
	Formatting
	Errors and Warnings
		Compile-time Errors
		Run-time Errors
		Logic Errors
		Compiler Warnings
	Arithmetic Examples
	More Arithmetic Operators
	Algorithms
	Summary
	Exercises
Conditional Execution
	Type bool
	Boolean Expressions
	The Simple if Statement
	Compound Statements
	The if/else Statement
	Compound Boolean Expressions
	Nested Conditionals
	Multi-way if/else Statements
	Errors in Conditional Statements
	Summary
	Exercises
Iteration
	The while Statement
	Nested Loops
	Abnormal Loop Termination
		The break statement
		The goto Statement
		The continue Statement
	Infinite Loops
	Iteration Examples
		Drawing a Tree
		Printing Prime Numbers
	Summary
	Exercises
Other Conditional and Iterative Statements
	The switch Statement
	The Conditional Operator
	The do/while Statement
	The for Statement
	Summary
	Exercises
Using Functions
	Introduction to Using Functions
	Standard Math Functions
	Maximum and Minimum
	clock Function
	Character Functions
	Random Numbers
	Summary
	Exercises
Writing Functions
	Function Basics
	Using Functions
	Call by Value
	Function Examples
		Better Organized Prime Generator
		Command Interpreter
		Restricted Input
		Better Die Rolling Simulator
		Tree Drawing Function
		Floating-point Equality
		Multiplication Table with Functions
	Commenting Functions
	Custom Functions vs. Standard Functions
	Summary
	Exercises
More on Functions
	Global Variables
	Static Variables
	Overloaded Functions
	Recursion
	Making Functions Reusable
	Pointers
	Call by Reference
		Call by Reference via Pointers
		Call by Reference via References
	Function Pointers
	Summary
	Exercises
Arrays
	Declaring and Using Arrays
	Arrays and Functions
	Prime Generation with an Array
	Multidimensional Arrays
	Pointers and Arrays
	Array Ranges
	C Strings
	Dynamic Arrays
	The sizeof Operator
	Copying an Array
	Memory Management
	Summary
	Exercises
Array Algorithms
	Sorting
	Flexible Sorting
	Search
		Linear Search
		Binary Search
	Array Permutations
	Randomly Permuting an Array
	Summary
	Exercises
Standard C++ Classes
	String Objects
	Vectors
		Declaring and Using Vectors
		Copying Vectors
		Vectors and Arrays
	Input/Output Streams
	File Streams
	Complex Numbers
	Summary
	Exercises
Custom Objects
	Object Basics
	Fields
	Methods
	Constructors
	Destructors
	Defining a New Numeric Type
	Encapsulation
	Summary
	Exercises
More on Objects
	Pointers to Objects and Object Arrays
	The this Pointer
	const Methods
	Separating Method Declarations and Definitions
	Preventing Multiple Inclusion
	Overloaded Operators
		Operator Functions
		Operator Methods
	static Members
	Classes vs. structs
	Summary
	Exercises
Building some Useful Classes
	A Better Rational Number Class
	Stopwatch
	Sorting with Logging
	Linked Lists
	Automating Testing
	Summary
	Exercises
Inheritance and Polymorphism
	I/O Stream Inheritance
	Inheritance Mechanics
	Uses of Inheritance
	Polymorphism
	Protected Members
	Fine Tuning Inheritance
	Summary
	Exercises
Generic Programming
	Function Templates
	Class Templates
	The Standard Template Library
	Iterators
	Summary
	Exercises
Exception Handling
	Summary
	Exercises
Appendices
Visual C++ Command Line Development
Developing C++ Programs under Unix/Linux with the GNU Tools
Introduction to Binary Numbers and Computer Arithmetic
	The Integer Types
	The Floating-Point Types
Bitwise Operators
Bibliography
Index
                        

Similer Documents