about
07/04/2024
C++ Track Summary

C++ Track Summary

Story, Bites, Repositories

Site Explorer CppStory code CppBite code
click header to toggle C++ Explorer
Story Index Prologue Introduction Models Models of structure and semantics Survey Quick tour Data Types & instances Operations Callable objects Classes Class structure Class relationships Relationships, composite objects Templates Code generators TMP Template metaprogramming Libraries Standard libraries Streams Buffered I/O STL Standard Template Library Interesting Other stuff of note    
Bite Index Just starting C++ Bites.
See C++ Story until they arrive.
Introduction Introducton to C++: Highs & Lows Survey Survey of CppBites Core C++   memory C++ memory model types type system classes class logical model, memory layout templates generic functions and classes STL Standard Template Library C++ 11   auto type deduction declaration shared_ptr reference counting smart pointer range-based for iterate over container move move construction and assignment lambdas local anonymous functions variadic templates argments generated from param pack few more things several smaller additions C++ 14   function return type deduction declare compiler generated type variable templates variable of template type aggr init braced initializ'n of aggr members generic lambdas lambdas taking generic arguments shared mutex provides shared and exclusive access tuple addressing via type access by type instead of position quoted stream read and write quoted stream few more things other additions C++ 17   if constexpr important helper for TMP structured bindings bind bracketed list to aggr fold expression expands variadic param pack over binary op std::filesystem library for managing directories std::apply() invoke callable with tuple of args std::any() type-safe container for any type few more things more extensions C++ 20   concepts compile-time bounds for template args modules share decls and defs across transl'n units coroutines functions that can suspend & resume ranges iterator-like object simplifying algor std::format string formatting library operator <=> provides defalut operations for <, =, > few more things more extensions    
Figure 1. C++ Demo Code
"Everything will be okay in the end. If it's not okay, it's not the end."
- Anonymous

The C++ programming language is large and complex. It has many useful features to manage its code structure, performance, and safety, and with each new version acquires more. That makes it difficult to learn in detail. Resources listed in the tables below provide a lot of help with both basics and details. As new C++ Bites arrive, that will become even better - easier to learn and they will become a good source for example code. C++ Highs and Lows
Code shown above on the right demonstrates side effects, something you usually avoid as that makes it harder to reason about the behavior of your program. It's included here to see a bit about how the C++ object model works. Callers of this function see changes to the value of the passed reference target. Because the argument is a reference, passed by reference, callers will also see a change of the target object referred to in the input. The object change happens at line 44. Since the object is held by a std::unique_ptr, the original object is destroyed by the end of execution of line 44. The new object will be destroyed by the time the caller's scope ends. C++ lets you do subtle operations that require care to implement correctly, as in this example. The purpose of this track is to help you acquire the skills to do that. The best way is to avoid subtle code like this, perhaps by passing a const ref and returning the desired result with a move operation. This page has references to things you need to quickly start programming with C++ and will eventually include a broad set references to the important parts of the language.

Table 1. - C++ Code Examples

Topic Content
C++ Code Examples C++ Basic Demos, STL Containers, IO Streams
C++ Repositories Index into C++ code Repositories including Tools, Utilities, Components, Libraries, Projects, and Demos
online code execution
godbolt Compiler Explorer, w3schools C++ compiler, onlinegdb, online-compiler, tutorialspoint
 
After writing your first few programs, it is likely that resources in Table 2. will speed up your progress understanding and using C++. The table contains intermediate to advanced materials written in plain language.
 

Table 2. - Other Resources

Topic Content
Tooling Using Visual Studio Code to create and build C++, Rust, and C# code
CMake, CMake Tutorial, CMakeDemo CMake is a tool used to build C++ libraries and executables. See discussion in Section #3 in Tooling, above.
Visual Studio Community Edition Download Visual Studio Integrated Development Environment
Visual Studio Help Slides (VS2017),
Visual Studio Help (VS2012)
These presentations are for earlier versions of Visual Studio, but they are still fairly accurate.
Intermediate and advanced resources from C++ community
C++ Frequently Asked Questions Questions about almost the entire C++ language
cppreference.com Quite complete reference for the C++ language
C++ language reference Language reference from Microsoft
C++ core guidelines Guidelines prepared by the C++ author (Stroustrup) and a prominent evangelist (Sutter)
 
You can find videos covering some of the topics in Table 1. using the "Resrcs" dropdown in the top menu. Experienced developers will find a lot of language details in the C++ Story and, as the Bites arrive, there too.
  Next Prev Pages Sections About Keys