Welcome to C++ Examples

This is my C++ cheat sheet. I created this because I dislike the examples already available. You'll find that, with the exception of Lambda functions, auto has been completely eliminated. You're welcome to use auto in your own code but you'll not find it hear anywhere unless it's an actual example of auto. You'll also find no global variables and a minimum of global functions. The point of these examples is to show a function's inputs and return values. Absolutely no effort has been made to be clever or to demonstrate my ability as a programmer. Error checking and exception handling are beyond the scope of this document. You're on your own for that.

So far this document contains STL examples up to C++17 and 2 sort algorithms. There's no other documenation. There are no explanations. cppreference.com is the primary reference while writing this document. The command I use to run the examples is "g++-12 -std=c++17 -o test.out test.cpp && ./test.out". I suspect more examples are to come as I think up new things or things are requested.

Happy coding.

Contact
C++ Examples© 2024 TBD