C++ has maintained its position as one of the most widely used programming languages in systems programming, game development, and performance-critical applications.
Despite being decades old, it continues to evolve with new standards, and remains a common first language in computer science curricula around the world. Its combination of low-level memory control and high-level abstractions makes it a practical choice for developers who need both performance and expressiveness.
For newcomers, finding an approachable yet reliable introduction to C++ can be challenging. Many textbooks assume prior programming experience or dive into complex language features too quickly. A beginner-friendly resource that balances clarity with substance is still a valuable tool for self-learners and students alike.
About the book
The Rook’s Guide to C++ is a Creative Commons-licensed introductory textbook written collaboratively by Norwich University students and faculty. It was produced during a 36-hour writing marathon involving 25 students, most of them freshmen, with faculty providing editing and additional content. The result is a book written from a student’s perspective, aimed at readers with no prior programming experience.
The book covers fundamental C++ concepts step by step, from basic syntax and variables to functions, arrays, file I/O, and introductory object-oriented programming. It favors pre-C++11 idioms and techniques to keep examples simple and approachable, while clearly noting where newer standards offer alternatives.
What you will learn
Readers will gain a solid understanding of the core building blocks of C++ programming. The book covers data types, variables, control structures, functions, arrays, pointers, strings, file input and output, and the basics of object-oriented programming including classes, objects, and encapsulation. Each chapter includes review questions with answers to reinforce learning, and sections point to further reading for those who want to go deeper.
Table of contents
- 1. History
- 2. Variables
- 3. Literals and Constants
- 4. Assignments
- 5. Mathematical Operators
- 6. Comments
- 7. Conditional Statements
- 8. Loops
- 9. Arrays
- 10. Strings
- 11. Functions
- 12. Scope
- 13. File I/O
- 14. Debugging
- 15. Pointers
- 16. Dynamic Memory Allocation
- 17. Classes I
- 18. Classes II
- 19. Composition
- 20. Separate Compilation
- 21. Linked List
- 22. Recursion
- 23. The Standard Template Library
Book details
- Title: The Rook’s Guide to C++
- Author(s): Jeremy A. Hansen
- Publication year: 2013
- Publisher: Rook’s Guide Press (Self-published)
- Pages: 160
- PDF size: 0.89 MB
- Estimated reading time: ~4 h
- Level: Beginner
- Main category: Programming
- Subcategory: C++
- Language: English
- License: Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
More books in: C++, Programming
Legal notice: This book is shared for educational purposes only. The content is distributed under Creative Commons licenses or with explicit permission from the author. FreeProgrammingBooks may host files that comply with their respective licenses.