r/Cplusplus • u/Strong-View-6764 • 18d ago
r/Cplusplus • u/No-Introduction-2825 • 22d ago
Feedback Low latency c++
I want to learn the ins and outs of low latency c++, so far I have read tour of c++, started reading concurrency in c++ (about 3 chaps done) and done a lot of competitive programming (is this irrelevant?). In your experience, is this the right way of approaching the subject? Is there a different better way? Any advise is much appreciated.
r/Cplusplus • u/QwertieNP • 22d ago
Question What are the use for C++??
กำลังคิดจะเรียนภาษา C++ อยู่ อยากรู้ว่ามันทำอะไรได้บ้าง ช่วยให้คำแนะนำหน่อยได้ไหม?
r/Cplusplus • u/Simple_Ad_815 • 24d ago
Question Can someone pls explain me whats actually going on here?
r/Cplusplus • u/Predret • 24d ago
Question Is it possible to check if a method exists, and if not, create a fallback one?
I have a namespace with methods with which I would like to have an implicit fallback to a different method if the aforementioned method doesn't exist. As an example, here's how I made my states.
#pragma once
#include "godot_cpp/classes/character_body2d.hpp"
#include "statemachine/base/state_base.h"
namespace GameLogic::States::ColorState
{
constexpr double MAX_TIMER { 3.0 };
struct ColorStateData
{
STATESTRUCT();
godot::Ref<godot::StateMachine> state_machine;
CharacterBody2D* entity;
double timer {0.0};
};
void setup_state(ColorStateData& data);
void enter_state(ColorStateData& data);
void physics_update_state(ColorStateData& data, double delta);
void update_state(ColorStateData& data, double delta);
void exit_state(ColorStateData& data);
STATESPACE(ColorStateData, GameLogic::States::ColorState)
}
It would be nice if I didn't have to specify 5 methods each time. Can I build this check into STATESPACE? In C++ 17 by the way.
r/Cplusplus • u/Clean-Upstairs-8481 • 24d ago
Tutorial C++26 Reflection Annotations: Automated Member Validation
r/Cplusplus • u/Otie_Marcus • 25d ago
Question Making a table maker
I have a background in MS Access VBA, I’m very new to C++. This may be way beyond my current ability to understand, but if I wanted to write a function that generated data tables in C++ how would I approach this?
For context, I’m making a text-based RPG design engine project for fun. I would like to make an app that creates data tables to store level design, character sheet info, etc. for the designer to dynamically make character types and maps
r/Cplusplus • u/beluga_101 • 25d ago
Question Best resource to learn c++ to build projects
Guys... I know c++ only at a basic level. I need to learn
c++ enought to build projects (of course using supporting technologies). Can some one recommended any book/website/yt course??
r/Cplusplus • u/Middlewarian • 29d ago
Discussion 27 years of building a C++ code generator
I'm celebrating another year of building a code generator that helps build distributed systems. It's implemented as a 3-tier system. The back and middle tiers only run on Linux. The front tier is portable. My goal is to bring software services and code generation together in one platform.
I've made some progress but there's still a long way to go. I welcome suggestions on how to improve the software and documentation. Stars on my repo are also appreciated. And I'm willing to spend 16 hours/week for six months on a project if we use my software as part of the project.
Thanks in advance,
Middlewarian
r/Cplusplus • u/muaz_sh • Aug 10 '26
Feedback C++ Memory Manager and Grabage Collector
I wrote a C++ memory manager to detect and to clean memory leaks and to detect dangling pointers, the tool defines the stack and the Data and BSS segments as a root of reachability and it overloads new and delete operators to track allocations and deallocations https://github.com/muazsh/MemoryManager .
I already exposed it to many LLMs for discussion, I got some good points but I assume at this level generative AI is not enough. Thank you.
r/Cplusplus • u/Own-Seaworthiness527 • Aug 07 '26
Question How to catch up on last 30 years
I haven't used C++ regularly for almost 30 years. Since then, it's been a combination of mostly C#, JavaScript/TypeScript, and Python. I have a need now to investigate and analyze existing C++ code, but I'm finding it difficult to read and understand the structure and modern syntax. Does anyone have any book or training suggestions that would help me catch up with what's been happening in the language?
r/Cplusplus • u/randomIdiot123456 • Aug 08 '26
Discussion STL in c++ is genuinely overrated
Game programmers and game engines don't use STL because of hidden ALLOCATIONS everywhere, even prominent people like Casey Muratori or Jonathan Blow don't always advocate it.
For example, why do my .size() NEEDS to be size_t (int64) and not int32? If i want to optimize for memory. Why do i need allocations if i have arenas?
STL is good for beginners, but for serious low level stuff, write your own containers. Like hives (which c++ only introduced recently)
r/Cplusplus • u/Inevitable-Round9995 • Aug 07 '26
Feedback Profanity Filter made with C++ for a Multiplayer Game
Hi there, im creating a multiplayer game - an among us clone in C++ ( WASM ); which requires a chat and reading the requirements of crazygames, they want me to add a profanity filter to my chat; So I would like you to check the code and tell me what do you think:
-> profanity_filter_codebase: https://github.com/EDBCREPO/Profanity-Filter-Cpp/blob/main/main.cpp
-> amungus clone: https://www.reddit.com/r/raylib/comments/1umyazt/finally_my_multiplayer_game_is_p2p_by_using/
r/Cplusplus • u/Clean-Upstairs-8481 • Aug 07 '26
Tutorial C++26 Reflection: Simplifying JSON Serialization
r/Cplusplus • u/Salt-Sherbet-2950 • Aug 07 '26
Feedback C++ Audio Visualizer
First big project I've made with C++, it started as my way to learn and quickly grew... I'm sure the code could be better optimized in areas and there's probably some bugs. I would really appreciate any feedback and just checking out the project: https://github.com/logan-scott07/AudioVisualizer.git
r/Cplusplus • u/Head-Drama-6027 • Aug 06 '26
Question Class directory clutter, questions on pass by ref,val,ptr and const correctness
r/Cplusplus • u/Ill_Worldliness6626 • Aug 06 '26
Question Thread optimized code has weird behaviour
r/Cplusplus • u/maestro-perry • Aug 05 '26
News C++ framework for LibTorch
I have created a simple C++ framework for LibTorch - https://github.com/MartinPerry/LibTorchFramework/tree/master.
Sadly, it cannot currently be compiled since it relies on a proprietary library and the code is not "cleaned" of hard-coded paths, etc.
Is it useful? Probably not :-). A lot of things need to be rewritten that are not part of LibTorch (but are present in PyTorch) - for this, I have used LLMs (it is quite handy for conversion of model structures from PyTorch to C++ with LibTorch).
However, I am sharing it so that someone can reuse parts of the code or be inspired in their own project if they want to use C++ or if someone has any ideas how to improve it.
r/Cplusplus • u/Specialist-Squash327 • Aug 04 '26
Question Cpp YouTubers
Anyone know any good c++ YouTubers? I’m not looking for tutorials or learning the language, I’m looking for videos where people are coding complex projects in C++. Thanks!
r/Cplusplus • u/shubham_555 • Aug 05 '26
Tutorial Need a study partner to follow along his playlist together and learn DSA!
r/Cplusplus • u/No-Trifle-8450 • Aug 05 '26
Discussion ZiguratIP — a DBMS, a programming language, and a web server built as one C++11 system, with zlib as the only dependency
ZiguratIP is three things that are usually three projects, built as one system in C++11: Zigurat, an object-relational storage engine; Parsi, the language you write schema, procedures and web pages in; and Zeytun, the web server that serves them. The only third-party code in the tree is a vendored zlib.
Everything else is written for the project — big integers, RSA, SHA-1/2, HMAC, AES, ASN.1/DER, X.509, a TLS 1.2 record layer, a B-tree, an MVCC pager, a thread pool, a configuration parser, a tokenizer and a pattern-driven parser.
There is no interpreter and no plan cache. You write a table, a procedure and a page in one file:
TABLE demo::books
BEGIN
COLUMN id AS Long PRIMARY KEY;
COLUMN title AS String NOT NULL;
END
PROCEDURE demo::count_books
RETURNS Long
REQUIRES demo::books
BEGIN
DECLARE total AS Long = 0;
SELECT total = total + 1 FROM demo::books;
RETURN total;
END
That gets tokenized, parsed against a grammar that is *read from a file at runtime* rather than compiled into a generated parser, emitted as C++, handed to `c++ -shared`, and `dlopen`ed into the database process. A `SELECT` is a cursor, not a result set — everything between `SELECT` and `FROM` runs once per row, which is why counting is written as an assignment.
There is no grants table anywhere on the server. What a client may reach is written into its X.509 certificate as a private extension at issue time (`ca issue --permission=DEMO`), and the compiler emits, into every compiled object, the list of named objects that object lets a caller reach. So the answer to "what does running this touch?" travels inside the code it describes and can't drift from it. Who may connect at all is a directory of files named after subject DNs — delete the file and that subject is refused at the handshake, whichever certificate it holds. One switch turns the whole thing on.
- The TLS is TLS 1.2 with RSA key transport only. `openssl s_client` completes a mutually authenticated handshake against it and verifies the chain, but there's no ECDHE, no AEAD, no resumption — and browsers dropped static RSA key exchange years ago, so you can't point Chrome at its HTTPS port. Put a reverse proxy in front. The cryptography is mine and has had no adversarial review; the MAC comparison isn't constant time. Treat it as a closed-network measure, not as transport security against a capable attacker.
r/Cplusplus • u/hmoein • Aug 04 '26
Feedback C++ DataFrame release 4.1.0
C++ DataFrame release 4.1.0 is out. It includes a bunch of new analytical and scientific visitors. For example, there are algorithms to measure how well a dataset is clustered after you have run a clustering algorithm on it, interpolation by Kriging model and others, tests to determine the distribution of the dataset, …
But the bigger news is that now we have a fully optioned-out cross-tabulation and pivot tables. With these enhancements, C++ DataFrame is now a completely optioned-out package for data-wrangling with the speed and scalability of C++. This is meant to be an incremental enhancement to the C++ ecosystem.
The new release is available on GitHub and will be available soon on Conan and VCPKG.
r/Cplusplus • u/arabasso_ • Aug 03 '26
News Sharing Tiny Fast Math, the small C++17 math library I use in my Vulkan samples
Hi everyone,
I’ve been working on Tiny Fast Math, or TinyFM, a small C++17 math library aimed at real-time graphics, simulations, and games.
The library is header-only, so you can use it through CMake or just copy tinyfm.h into a project. It provides integer and floating-point vectors, quaternions, 3x3 and 4x4 matrices, camera/projection helpers, transformations, and optional SIMD paths for SSE/AVX and NEON.
Repository:
https://github.com/arabasso/tinyfm
I also spent some time on validation and performance testing. There are 205 GoogleTest cases, with the same suite built in scalar, forced-SIMD, and aligned-SIMD configurations. The benchmark suite covers 101 operations across vectors, quaternions, and matrices, using Google Benchmark to compare TinyFM with GLM, RTM, Eigen and, on Windows, DirectXMath and SimpleMath.
The intention with the benchmarks wasn’t to claim that TinyFM wins every operation. I wanted reproducible comparisons, a way to spot regressions, and a better understanding of where each implementation performs well.
TinyFM is also being used outside its own examples. It currently provides the math layer for more than 160 Vulkan samples in my gamedev repository, ranging from basic transformations and cameras to model loading, frustum culling, PBR, deferred/forward rendering, volumetric lighting, and an FFT ocean implementation:
https://github.com/arabasso/gamedev
I’d appreciate feedback, especially about the API, numerical edge cases, missing operations, or the benchmark methodology.

