An Animated Introduction to Programming with C++
by
Mark Mahoney
Part 1- Flow and Data
How to read this book*
Start Here!
Printing and flow of control
Declaring variables in memory
Basic types in C++
Numeric data types and weirdness associated with them
Characters and strings
Input from the keyboard
Rework of the distance formula with user input
Gas mileage
Part 2- Selection
bool
data type
Selection with
if/else
Another
if/else
Logical operators, nested
if
s, and
if/else if
The
switch
statement
Part 3- Looping
A simple loop
A less simple loop
Summing in a loop
Nested loops
for
loop
Capitalizing a sentence with a
for
break
and
continue
Part 4- Arrays
A simple array
Average and standard deviation with an array
Some problems with plain old arrays
Two dimensional arrays
More than two dimensional arrays
Part 5- Functions
Simple functions
Value returning/
void
functions
Passing parameters by value
Passing parameters by reference
The scope of local variables and parameters
isPrime function
Passing arrays as parameters
Part 6- Vectors
Simple
vector
Passing a
vector
to a function
Advanced methods of a
vector
Read from a file and store in a
vector
Linear search and binary search
Sorting values in a
vector
Writing values from a
vector
to a file
Two dimensional
vector
s
Part 7- Structured Data
Simple
struct
s
Hierarchical
struct
s
vector
s with
struct
s
vector
s of objects with
struct
s
Integral calculus with
struct
s
Part 8- Pointers and Dynamic Memory
Pointers
Pointers to objects
Vectors of pointers
Arrays are pointers
Pointers as parameters
Comparing pointers
Different memory types
Dynamic memory example
Dangling pointers and null
Dynamic array of students
Part 9- Classes
Simple class
Class with data and methods
Classes with objects as members
Common word analyzer
Classes with pointers to objects on the heap
Inheritance and polymorphism
* (
Click here for some additional Storyteller documentation
)