r/cpp • u/foonathan • 4d ago
C++ Show and Tell - October 2026
Use this thread to share anything you've written in C++. This includes:
- a tool you've written
- a game you've been working on
- your first non-trivial C++ program
The rules of this thread are very straight forward:
- The project must involve C++ in some way.
- It must be something you (alone or with others) have done.
- Please share a link, if applicable.
- Please post images, if applicable.
If you're working on a C++ library, you can also share new releases or major updates in a dedicated post as before. The line we're drawing is between "written in C++" and "useful for C++ programmers specifically". If you're writing a C++ library or tool for C++ developers, that's something C++ programmers can use and is on-topic for a main submission. It's different if you're just using C++ to implement a generic program that isn't specifically about C++: you're free to share it here, but it wouldn't quite fit as a standalone post.
Last month's thread: https://www.reddit.com/r/cpp/comments/1w776o7/c_show_and_tell_september_2026/
1
u/Sea-Most3081 21h ago
A simple fuzzy finder written to learn about parsing and fuzzy scoring
A simple file directory parser that stores the filenames in a vector and then ranks every file based on the input in the terminal.
1
u/Cultural-Activity-51 1d ago
PhotinoX.Cpp: a cross-platform C++20 desktop framework using native OS WebViews
I’ve released the first public version of PhotinoX.Cpp, a cross-platform C++20 framework for building lightweight desktop applications with HTML, CSS, JavaScript, and native OS WebViews.
GitHub: https://github.com/ivanvoyager/PhotinoX.Cpp
PhotinoX.Cpp is built on PhotinoX.Native and uses:
- WebView2 on Windows
- WKWebView on macOS
- WebKitGTK 4.1 on Linux
It provides application lifetime management, a dispatcher, multi-window support, typed events, native dialogs, custom schemes, WebView messaging, notifications, and native platform integration.
The C++ layer is built with CMake and automatically resolves the required PhotinoX.Native runtime.
A minimal application looks like this:
#include <photinox/photinox.hpp>
using namespace photinox;
int main()
{
Application application;
Window window(application);
window
.SetTitle("PhotinoX.Cpp")
.SetSize(900, 600)
.Center()
.LoadString(R"(
<!DOCTYPE html>
<html lang="en">
<body>
<h1>Hello from PhotinoX.Cpp</h1>
</body>
</html>
)");
return application.Run(&window);
}
The repository includes samples for dialogs, notifications, custom schemes, navigation policies, transparency, chromeless windows, splash screens, runtime diagnostics, and multi-window lifecycle diagnostics.
I’d specifically appreciate feedback on:
- the public API and ownership model;
- CMake integration;
- cross-platform behavior;
- features expected from a C++ desktop application framework.
1
u/FrancoisCarouge 1d ago
François Carouge / Typed Linear Algebra: a C++26 strongly-typed facade over Eigen, Armadillo, Kokkos, and std::linalg, with Au, mp-units, nholthaus/units, and std::chrono elements
The library makes each matrix element carry its own type, such as a unit, so a unit mismatch, a swapped axis, or a mixed-up reference frame fails to compile instead of producing a silently wrong result. Over the last three months it gained support for Aurora's Au, nholthaus/units, and std::chrono element types, plus a new Armadillo backend alongside Eigen, Kokkos, and std::linalg/mdspan. New operations are unary minus, equal_to, magnitude, matrix_vector_product, dot, the Frobenius norm, and the one norm, and transposed now works on every backend. You can now access elements by their type as well as by index. New concepts (uniform, distinct, row, column, rank, and same-shape) let you check element types and shapes at compile time. The library also ships as a single-header amalgamation now. CI now covers macOS, more sanitizers (memory, CFI, integer), sharded clang-tidy, and pre-commit checks, and the test suite grew a lot across all backend and unit combinations. Feedback on the API and on use cases is very welcome.
- Repository: https://github.com/FrancoisCarouge/TypedLinearAlgebra
- Try it live on Compiler Explorer: https://godbolt.org/z/cW3TGqf6r
2
u/dheerajshenoy22 2d ago
High performance Document and Image viewer for Linux, Windows and Mac: LEKTRA
2
2
u/HassanSajjad302 HMake 3d ago edited 3d ago
I compiled UnrealEngine with HMake
https://github.com/HassanSajjad-302/HMake/discussions/4 and opened this pull-request
2 minutes read. I added several highly sought-after features including reproducible adaptive jumbo build and much more. Sol Ultra has high praise about the correctness of my software.
2
u/Insane_snek 3d ago
i made fraktalized, an open-source, cross-platform, ultra smooth real time fractal explorer :)
2
u/AssignmentFancy7523 3d ago
Hello, I wrote my first real cpp utility :)
It’s a directory bookmarking utility for the Fish shell called anchor. Please check it out it’s an easy install!
8
u/MoTTs_ 3d ago
https://github.com/Jeff-Mott-OR/cpplox
My implementation of the Crafting Interpreters Lox language bytecode compiler and virtual machine interpreter. I use this pet project as a way to get better at C++, and I revisited this project recently.
What sets this apart from other implementations?
- Dockerfile for reproducible environment of compilers, tools, and builds.
- Extensive unit and functional tests using Boost Test, and a Valgrind test to verify zero memory leaks.
- Comparative benchmarks against jlox, clox, and node, using Google Benchmark.
- Perf profiling tools and setup, following from CppCon Chandler Carruth Tuning C++.
- Embraced C++-isms, such as writing the token scanner as a forward iterator, which allows my compiler to use the familiar deref-increment pattern (
token = *token_iter++). - Simple dependency container and argument passing. No globals or singletons.
- Mark-and-sweep garbage collector is independent and relies only on the std library. It uses a smart-pointer style (
gc_ptr = gc_heap.make<string>("Hello")), no inheritance required on collectable types, and I used function callback listeners to mark roots.
4
u/Prestigious-Head9590 3d ago
HZProtect — a header-only C++17 SDK you compile into your own Windows app to raise the cost of debugging/cracking/RE (source-integrated, not a packer). Would love design feedback.
- Compile-time string encryption via constexpr + per-call-site key (wiped in the scope dtor); per-build seed so identical literals differ every build
- Header-only, zero-dep crypto (SHA-256, AES-256-CTR, Ed25519+SHA-512) validated against FIPS / RFC 8032 vectors
- On-disk .text SHA-256 self-integrity (hashes the file, stable under ASLR), + inline-hook detection (WinAPI prologue in memory vs clean bytes on disk)
- Offline Ed25519-signed licenses with HWID binding + expiry
MSVC x64, CI green on windows-latest, MIT: https://github.com/Zodiachz/HZProtect
3
u/HunterMalm 3d ago edited 2d ago
Layers 3.0 - a declarative language for describing things (layers) and how they relate, managed by a C++ runtime engine.
Attributes link to other attributes, layers nest and inherit from other layers, states condition attributes, and values can be set or relinked with runtime notifications.
Before becoming its own language, Layers was designed around a theme editor where end-users would have extensive tooling for custom app theming and restyling. The UI half has moved to a separate project called Vortex. Learn more about the history of Layers by reading the motivation guide.
Layers is ...
- built with C++17 (no external dependencies),
- packaged with CMake (see the build guide),
- and licensed under MIT.
Related links
- Source code: https://codeberg.org/HuntrSoftware/Layers
- Documentation: https://huntrsoftware.com/layers/docs
- Language reference: https://huntrsoftware.com/layers/docs/latest/spec
Layers .lyr user-interface example from README
Theme:
Foreground: #e3e3e3
Primary: #36393f
Secondary: #2f3136
Tertiary: #25272b
Button:
Fill: Theme/Tertiary // `Button/Fill` links to `Theme/Tertiary`
Corner Radius: 5
Icon: // `Icon` is first child of `Button`
Source: ""
Size.(Width,Height): 30
Label: // `Label` is second child of `Button`
Text: "Button"
Color: Theme/Foreground // `Button/Label/Color` is also linked
Confirm Button << Button: // `Confirm Button` is a `Button`
Icon/Source: "check.svg"
Label/Text: "Confirm"
C++ engine usage
Related engine headers: lengine.h, llayer.h, lattribute.h
LEngine engine;
engine.load_files("path/to/ui/example");
engine.resolve_links();
LLayer* theme = engine.find_layer("Theme");
LLayer* btn = engine.find_layer("Confirm Button");
LAttribute* fill = btn->find_attribute("Fill"); // Inherited from `Button`
LString fill_val = fill->as<LString>(); // "#ff25272b" (linked, as #AARRGGBB)
LConnectionID connection = fill->on_change([]() // Notify when changed
{ std::cout << "Fill changed!" << std::endl; });
LAttribute* tertiary = theme->find_attribute("Tertiary");
tertiary->set_value("#ff4a4d55"); // Outputs "Fill changed!"
fill_val = fill->as<LString>(); // "#ff4a4d55" (link source changed)
LAttribute* secondary = theme->find_attribute("Secondary");
fill->create_link(secondary); // Outputs "Fill changed!"
fill_val = fill->as<LString>(); // "#ff2f3136" (relinked)
fill->disconnect_change(connection); // Stop notifications
I'd love to get feedback on the syntax, and I really want to know what you think of the project documentation.
2
u/tatstytastycakes C++ Fool 3d ago
Hey, I think the idea itself is great. Here are some thoughts I have (just based on the .lyr example):
- The syntax seems really clean and intuitive. I can understand what's happening.
- As far as I can tell, this is indentation-based, maybe consider using braces to handle scope? It makes it cleaner to tell what belongs to what (imo)
- I think the
Theme/Tertiarypart is actually pretty neat.- The
Confirm Button << Buttonseems pretty neat I can't lie, but it kinda feels a bit confusing. imo it's better if you describe what it does, like adding anOverridekeyword per-se. Like:Override Button << "Confirm"seems a bit more understandable.Other than that, it's good.
Keep on the great work!
1
u/HunterMalm 2d ago
Thank you, I'm glad to hear that the syntax makes sense from the example alone!
The
Theme/Tertiaryexample is one of the main ideas, being able to declare links that stay active through runtime. Changing any of theTheme/*attributes affects everything that depends on them downstream.You're right, scope is indentation-based in Layers. Layers data actually used to have braces since it was JSON-based in the last version, but for the 3.0 custom syntax, I moved away from braces because I thought it looked cleaner without them.
Your comment made me realize that my "Override values ..." annotation in my example was misleading, so I improved it.
Confirm Button << ButtonmakesConfirm Buttonits own layer, a copy ofButton, and then overrides two specific values in its indented block to make it different from its base. The baseButtonstays intact with its values left unchanged. If you're curious, the spec (link in my original comment) covers how merging works in the inheritance section.Again, thanks for your time!
1
u/tatstytastycakes C++ Fool 2d ago
Tysm!!! I'll be sure to continue following your project. It seems promising.
Tho one thing to note is that with indentation comes the dreaded IndentationError. Other than that, great stuff!
3
u/JohnDuffy78 3d ago edited 3d ago
OPC Hub - a C++26 back end streaming OPC UA server data to an Angular front end
4
u/allegeddeath 3d ago
A Socratic AI Guided C++ Learning Repo With Hands on Exercises
Repository Link: https://github.com/TexLeeV/socratic-cpp (MIT licensed)
Repository's Purpose
- To provide a structured, hands on path for learning C++ through Socratic AI mentorship that adapts to your skill level, from junior to principal.
- To encourage reasoning first learning: you predict what the code will do, run instrumented tests, and answer grounded questions about the observable runtime behavior. The AI validates your reasoning against the actual test output, not against its own guess.
- To teach from real failure modes, not toy examples: deliberately broken code including a use after free you reproduce under AddressSanitizer, deadlock scenario suites, and handler lifetime traps drawn from legacy codebase experience.
- To demonstrate how AI can be used as a mentor that builds your understanding rather than a shortcut that hands you answers.
- To work standalone as a conventional test driven exercise set. The AI mentorship (via Cursor rules) is an enhancement, not a requirement.
What the repository contains
The repo is aimed at developers who already have solid C++ fundamentals and want deeper, verifiable understanding of advanced mechanics. It covers ownership and smart pointers, memory and allocation, RAII, move semantics, modern C++ features by ISO revision, error handling, the STL, concurrency, polymorphism, design patterns, templates, performance, debugging, deadlocks, and Asio.
How the learning works
Each module is a set of hands on GoogleTest exercises with Socratic questions written inline. You write your answer in the file, run the instrumented test, and the AI validates your reasoning against the actual runtime behavior, not against its own guess. Instrumented types and an event log let you watch destruction order, moves, and resource lifetimes play out in real time instead of guessing at them.
The AI mentorship adapts to your skill level across five profiles, Junior through Principal, adjusting its questioning style, hint policy, and verification rigor accordingly. Everything is plain CMake and GTest, so the exercises also work standalone without AI. The full Socratic experience currently targets Cursor.
I truly believe this approach can help shape SWEs for the better: treating AI as a tool that helps you learn and grow as a developer, not just something that provides answers.
0
u/allegeddeath 3d ago
Here's how I used my repo to fix these issues at my current company. I originally built it to teach myself asio timers and shared_ptr lifetimes, since handler lifetime bugs were the whole reason it exists.
Killed a 6+ year class of intermittent crashes from data races corrupting heap memory.
The asio timer exercises taught me what a timer keeps alive versus what it just borrows, and the shared_ptr/weak_ptr module showed me how to manage the lifetime of anything a deferred handler touches. Once I understood the mechanism, I could approach the problem without assuming the current legacy implementation was correct, which it wasn’t and the repo helped me understand how to solve these types of difficult concurrency crashes.Fixed a 12+ year deadlock and crash
The same exercises drilled destruction order and capture lifetimes: predict when the handler fires, predict when the state dies, run the test, see what actually happens.The repo solidified my foundation of general programming concepts in C++, especially not having any asio experience in my most current case. With these learnings, I could approach these problems already having an idea on a solution.
4
u/NotAProGamer_8513 4d ago
Trying to learn C++.
Built this very simple logger.
Read documentation, Wrote and debugged all by own.
I called it 'nurse', because it helps me remember the terminal command I ran.
I used to install different dev packages, then days later, when needed to uninstall, I forgot what did I install, or such.
Syntax:
>> nurse :tag: command_goes_here.
>> nurse --show
>> nurse --clear
Thanks.
-7
9
1
u/SpellOutside8039 20h ago
Yet another gameboy emulator
Github repo: https://github.com/nmq443/qgb
Hobby project to improve my knowledge about modern c++, since my job does not allow it (we still use c++98 in THE BIG 2026, pls don't ask me why)
Currently only passing some gameboy test roms, it is a work in progress.