about
12/06/2022
CppBasicDemos Repo
CppBasicDemos Repository
A good source for practice code
Quick Status
- Add GraphWalk demo
1.0 Contents
-
CMakeDemo
How to use CMake with hierarchal and non-hierarchal configurations.
-
PointersAndReferencesDemo
Basic syntax and use of pointers and C++ references. -
LambdaCapture
Lambdas are a short-cut syntax for creating functors. -
CallableObjects-SimpleDemo
Callable objects are any C++ construct with invocation syntax, e.g., function, function pointer, functor, and lambda. -
StorageSizes
Evalulates sizes of the C++ fundamental types in CppBasicDemos > TypeTests > StorageSizes -
CastTests
Demonstrates each of the modern cast types in CppBasicDemos > TypeTests > CastTests
-
Equiv
Construction syntax that is context dependent and may be confusing for those new to C++ -
ClassLayout
Class Layout in memory - illustrates that inheritance and composition create nested instances.Instance Layout
-
DemComp
Illustrates basic composition syntax and use of constructor initializers. -
DemInherit
Inheritance demos illustrate the importance of specifying base and component initialization using constructor initializer sequences. -
DemInit
Initialization syntax demos.
-
iostreams
std::iostreams - console, files, filebuf, and stringstream demos. -
STL containers
Simple operations for each of the STL containers. -
TreeWalk
TreeWalk - demonstrate tree walks with recursion, stacks, and queues. -
GraphWalk
GraphWalk - demonstrate graph walks with recursion, stacks, and queues. This requires tracking visited nodes.