Email the Author
You can use this page to email Jason Turner about Object Lifetime Puzzlers Book 1.
About the Book
Also available in print: https://amzn.to/3F724ig
A book of puzzles that should be fun for anyone, but actually educational for people interested in C++.
The solution to every puzzle is a C++ related term or phrase. If you don't know what the solution means, you can search and learn something new.
void run() { { static S object_1("t", "t"); } S object_2("i", "e"); static S object_3("m", "_"); } // Answer (6):// __ __ __ __ __ __
In this puzzle world each object says its first name when its lifetime begins and its last name when the object's lifetime ends. It's just that simple.
The challenge and fun is in keeping track of what order objects' lifetimes begin, and knowing what order they must end in.
Each section has a description of the new concept introduced, and the challenges are increased at a leisurely pace.
About the Author
Jason is host of C++Weekly https://www.youtube.com/c/JasonTurner-lefticus, Co-host of CppCast http://cppcast.com, Co-creator and maintainer of the embedded scripting language for C++, ChaiScript http://chaiscript.com, and author and curator of the forkable coding standards