The Rook's Guide to C++This Creative Commons-licensed textbook written by Norwich University students and faculty aims to provide an introduction to the C++ programming language. The PDF and original typesetting materials are available if you are interested in having a free digital copy of your own or if you wish to contribute to improving the book. Please visit rooksguide.org for more details. |
Contents
History | 1 |
Variables | 3 |
Literals and Constants | 7 |
Assignments | 11 |
Output | 15 |
Input | 21 |
Arithmetic | 25 |
Comments | 33 |
Arrays | 71 |
Blocks Functions and Scope | 77 |
Problem Solving Troubleshooting | 89 |
The Preprocessor | 93 |
Advanced Arithmetic | 97 |
File IO | 103 |
Pointers | 111 |
Dynamic Data | 117 |
Data Types and Conversion | 39 |
Conditionals | 47 |
Strings | 55 |
Loops | 61 |
Classes and Abstraction | 123 |
Separate Compilation | 133 |
STL | 137 |
Common terms and phrases
accessors arithmetic array assign a value aer braces bytes character cmath compiler constructor contains counter cout create data type default defined dereference operator do-while loop double variable end condition endl enter a value example executed float following code fP tr fPtr func function call function definition function name Further Reading Go Cadets guess header file Hello World implementation file include iostream infinite loop initialize integer iterators keyboard keyword line of code literal member function member variables Memory leak modulo operator mutators my_games myArray myIterator myVal namespace std NULL object oen parameter parentheses Rectangle result Review Answers Review estions screen semicolon Significand sqrt Standard Template Library string literal string myString struct student STUDENT_H switch statements tFile type int user input var1 var2 variable named variable of type variable2 vector void function Write code wrien