The Rook's Guide to C++
Jeremy Hansen
Computers & Technology
The Rook's Guide to C++
Free
Description
Contents
Reviews

Developed by Bjarne Stroustrup, C++ has become one of the most popular programming languages in the world. Originally, it was designed as an improvement upon the C language, which was developed by Bell Labs. Developed in the early 1970s, C’s name is derived from the B programming language, which in turn was derived from the BCPL language. C gained a large following, in part due to its use in the development of the UNIX operating system. Due to both its popularity and the number of versions on the market, an American National Standards Institute (ANSI) committee was formed in 1982 to create a standard for the C language, which was adopted in 1989.

Stroustrup began with the idea that object oriented programming would be an important addition to C, and created C with Classes. In 1983, Stroustrup’s contri- butions officially became known as C++, its name stemming from C and adding the ++ (increment) operator. It wasn’t until 1998 that the international standard for C++ was established.

Since then, most changes have been minor. In 2005, a report was released by the ISO on features that were intended to be included in the next version of C++. The early versions of this became known as C++0x, until 2011, when the C++11 standard was released by the ISO.

In this book, we’ll favor older techniques, pre-C++11. When C++11 features are discussed, they will be pointed out as such. While not all of the new features are discussed, we will be trying our best to explain them as we go.

Print and source available via rooksguide.org

Language
English
ISBN
978-1-304-66105-0
History
Variables
How do I decide which data type I need?
Identifiers
Declaring a Variable
Initializing Variables
Assignment Statements
Review Questions
Review Answers
Further Reading
Literals and Constants
Literals
Declared Constants
Review Questions
Review Answers
Assignments
Review Questions
Review Answers
Output
Review Questions
Review Answers
Further Reading
Input
Review Questions
Review Answers
Further Reading
Arithmetic
Review Questions
Review Answers
Further Reading
Comments
Review Questions
Review Questions
Data Types and Conversion
Floating-point types
Other types introduced by C++11
Conversion Between Types
Coercion & Casting
Automatic Types in C++11
Review Questions
Review Answers
Further Reading
Conditionals
if, else, and else if
A small digression on expressions
Using else
switch statements
Review Questions
Review Answers
Strings
Review Questions
Review Answers
Further Reading
Loops
Introduction
Having Fun while Programming
do-while Loops
Event-Based Loops vs Count-Based Loops
for work or for play
Picking a Loop
Nested Loops
Infinite Loops
Review Questions
Review Answers
Further Reading
Arrays
Multi-dimensional Arrays
Review Questions
Review Answers
Further Reading
Blocks, Functions, and Scope
Blocks
Basic Functions in C++
What are functions and why do we use them?
The parts of a basic function
void Functions
Overloading Function Names
Scope
Review Questions
Review Answers
Further Reading
Problem Solving & Troubleshooting
The Compilation Error
The Logic Error
The Infinite Loop
Review Questions
Review Answers
The Preprocessor
Review Questions
Review Answers
Advanced Arithmetic
Examples
pow()
sqrt()
Modulo
Review Questions
Review Answers
Further Reading
File I/O
I/O Streams
File I/O
Opening and closing a File
Reading from a File
Writing data to a File
Introduction to Classes and Objects
Other functions
Review Questions
Review Answers
Further Reading
Pointers
Review Questions
Review Answers
Dynamic Data
Review Questions
Review Answers
Further Reading
Classes and Abstraction
structs
Assigning values to member variables
Classes
public and private variables and functions
Defining member functions
Using member functions
classes and structs together
Constructors
Overloading Member Functions
Review Questions
Review Answers
Further Reading
Separate Compilation
Review Questions
Review Answers
Further Reading
STL
#include <utility> #include <tuple> (C++11)
#include <iterator>
Forward iterators
Bidirectional iterators
Random access iterators
#include <vector>
#include <map>
Further Reading
The book hasn't received reviews yet.