C++ Track

Story, Bites, and Repositories

Story Index Prologue Introduction Models Models of structure and semantics Data Types & instances Operations Callable objects Structures Class structure Libraries Standard libraries References Resource links    
Bite Index Introduction C++ overview Hello Hello World program Data C++ data types and instances more to come not for a while STR Class not for a while Glossary Glossary of C++ terms Summary Language summary    
Figure 1. C++ Demo Code
"C++ is a general-purpose programming language with a bias towards systems programming that is a better C; supports data abstraction, object-oriented programming, and generic programming."
- Bjarne Stroustrup, creator of C++

There are four ways of viewing Cpp content in this site:
  1. Cpp Story
    An ebook with seven chapters that covers Cpp programming at intermediate level.
  2. Cpp Bites
    A large collection of pages each focused on one feature of the Cpp programming language, starting with basics.
  3. Blogs
    There is now, as of 07 Jan 2025, one C++/Rust blog. That is expected to change eventually.
  4. Compiler Explorer
    An on-line code editor and executor
It's easy to sample each of these views by using the links above, or more selectively, using links in the CppExplorer panel on the left (if you don't see it, click on page header). Cpp Highs and Lows

The code above on the right illustrates a Cpp "ShowType" function, useful for evaluating standard library and user-defined types when learning a new language.
Everything below this line is a place-holder for content to come.

Table 1. C++ Resources from this site

Site Resources Content
C++ Repositories Index of all the Cpp code repositories
C++ Models Summary of features with screenshots and examples - pdf
C++ Story
Index at upper right on this page.
Cpp ebook in 7 chapters
first chapter in C++ Story
C++ Bites
Index at upper right on this page.
Dozens of Code Bites about Cpp
first C++ Bite <-- good place to go after this page
C++ Glossary Definitions of common terms
C++ FlashCards Basic types and data structures
Bits of Code Compares small C++, Cpp, C#, Python, and JavaScript codes  
Cpp Playground online compiler
Code Examples Content
Cpp Repositories Index into Cpp Repositories
Cpp Code examples List of CppBites code examples, CppPlayground code examples, Cpp Basic Demos Repository
online code execution CppPlayground, tutorialspoint
Other Resources Content
Cpp Guide Definition and examples of Cpp collections, iterators, and concurrency constructs.
Tooling Using Visual Studio Code to create and build Cpp code
Cpp home site Download and install, learn Cpp
Cpp user's forum Create an account and you can log-in, read, and post messages and questions.
The Cpp Reference Semi-formal, but surprisingly readable, reference for Cpp
Cpp API Guidelines Guidelines for crafting Cpp code, from the source
Other intermediate and advanced resources
How to learn modern Cpp A collection of links to explorations of intermediate and advanced language materials
idiomatic Cpp resources Annotated links to articles and examples of community accepted styles and patterns for Cpp code.
 
You can find videos covering some of the topics in Table 1. and Table 2. using the "Videos" link in the top menu. First Cpp Bite is a good next step after this page.

Exercises

  1. Write a Cpp program to find the largest file in a specified directory tree, using walkdir crate from crates.io.
  2. Ammend Project #1 by accepting arguments from the command line, using args crate.
  3. Use ChatGPT to create a directory traversal crate and use that instead of walkdir.
  4. Write a Cpp program to read a source code file and count the number of lines and number of scopes for each function. You can count scopes by counting open braces "{". Start by searhing for fn and then read each line searching for "{" and "}". Push each open brace on a stack, and pop when a closed brace is encountered. When the stack is empty, the end of the function has been reached.
  5. Modify Project #4 by counting lines and scopes for each file in a directory tree rooted at a specified folder, usually named "src".