C++ is a widely used, and in some ways elegant, programming language. Its use is compelling
because:
It has excellent performance, due in part to the fact that it compiles to native machine code
rather than to byte code interpreted by a virtual machine.
C++ is very expressive. Its operator syntax, use of aliases, and syntactic separation of
interface from implementation, allows a designer to express design intents very clearly.
The language supports class designs that allow users to be oblivious of the acquisition
and handling of resources. Its standard libraries often make a lot of that almost automatic.
It provides direct control over the acquisition and release of resources, and those
actions are deterministic. The designer has a lot of control over the release of resources
that are shared within a process, like file handles.
It is the only modern language that supports creating user-defined value behavior with
classes that may also participate in polymorphic class hierarchies.
C++ is still evolving to become more efficient, designer-friendly, and provide more artifacts that
support safe, reliable operation, like the standard smart pointers, move operations, and better
type deduction. Its current standard is C++17 and the next, C++20, is moving toward completion.
This story is intended to help you get started or refresh your knowledge of C++.
Story Content:
This is a story about the C++ programming language. It orders content
from this site into a sequence of chapters about the C++ programming language. Each page of the story
is linked in the Table of Contents (TOC) dropdown.
Chapter 1. - Introduce basics
Chapter 2. - C++ classes
Chapter 3. - Class relationships and the construction of compound objects
Chapter 4. - Templates and Template Specialization
Chapter 5. - Conclude with a survey of the code repositories and how you might strengthen your C++ skills
Appendix - C++ Survival Guide, C++ Examples, C++ References
Story Navigation:
You can sequence through the story using "Next" and "Prev" buttons on the right,
or use the "TOC" Table Of Contents links.
Story pages have navigation menus that allow you to navigate away from story content.
To return, simply use the "Curr" button. It points to the last visited (Current) story page.
Any time you want to leave the story, simply use the "Exit" button.
If you need help, use the "Help" button. Get page specific commentary by clicking on the [?] button.
If the StoryTeller is in focus (last button click outside page view) then you can also use navigation keys:
N => Next
P => Prev
C => Curr
H => Help
E => Exit
Notes:
Using key events can be a bit confusing, especially the N and P key presses. All the pages
in this story are connected and can be walked using these keys when the focus is on the StoryTeller.
However, some pages in the site, which may be included in the story, have their own model of a
next sequence. For example, you can iterate through all the blogs using N and P key presses,
when the focus is in the page view area, e.g., the iframe. So there, instead of proceeding to
the next story page, you would move to the next blog.
This dual use of page sequencing can be quite useful, but it may take you a few attempts to get
comfortable with it.
Links to other sites in the content view (an iframe) will fail to open due to a security violation.
You can still view that content by opening in a new tab so it doesn't get loaded in
the iframe. Simply right-click or if you are using a touch screen, press and hold the link and
select open in new tab.
Story ToDo:
Add more content pages.
Add more exercises in the exercise pages for each chapter.
Convert most of the pdf content to web pages.
Add section on template specialization in Chapter 4.
Discuss template metaprogramming, using CppProperty as an example