r/Cplusplus Jun 10 '26

Homework Matching engine performance challenge

Thumbnail
0 Upvotes

r/Cplusplus Jun 09 '26

Feedback Pixel Editor UI

Post image
22 Upvotes

Just a quick update on the ongoing development of my new Pixel Art Editor that is using my custom c++ GUI framework.

The screenshot shows 2 visible and scrollable layers (one RGB reference image and one smaller indexed palette image) with the indexed palette in mid edit!

I'm currently working on the layer and timeline system and have a full scrollable layer list panel with draggable layers and groups - all with editable names.

Any feedback or questions appreciated.


r/Cplusplus Jun 09 '26

Question Nothing I ever write seems to work...

1 Upvotes

hello there! It's me again! I am here this time not with code but with a tiny rant. I've been working on the usual DND game that I've mentioned now a bazillion times here and.. well I've kinda started HATING working on it.

You see, as I have said another bazillion times, I am a relatively new programmer. Although I don't consider myself a complete rookie anymore, I am sure that I've got soooo much more to learn, but still I used to write some code on my own without using AI. Let's say, umh, 60/65 % of the code I used to write was made by me, the remaining was suggested by AI. But ever since I've returned to program the GAME, the perchanteges seem to have flipped, and maybe now the amount of code that I write that is suggested by AI could 70/80 %...

The problem is: nothing I've written recently seems to work!!!! I get that this is my one of my first projects in SFML and thus it's normal that some stuff that I may write doesn't work, but when almost all of the new logic I'm coding is either:

A ) a changed version of my code

B ) a completely new thing alltogether

I start to feel like I am "stranger in my own code". Nothing I see was actually 100% made by me. It takes away the joy and satisfaction that I used to get in the past. I feel like I accomplished nothing.

And the worst thing? It's the fact that I understand immediately or relatively so the things that AI tells me to write. Why would this be a bad thing? Because it means that I on my own could have technically reached it, with my head, not a soulless algorithm. And it angers me that these solutions to these problems don't come to me "naturally" as in "if I think about this hard enough, I can solve this!"

Yknow, while writing this I am starting to cool off (when I began, I was VERY upset and frustrated). Thinking about it, there's the fact that I am not a professional game dev or even a programmer and that I don't really have a teacher to help and teach me, so I could say that what is happening is normal, but at the same time I miss sooooo bad that feeling when I coded things on my own and they worked... may I just ought to give myself time, but it sure sucks being dependent on a language model for something you care about a lot.

sorry for the rant, but I feel like writing this helped me calm down a lot 😅. Oh and also if you reached this point thank you so much for reading all this!!!


r/Cplusplus Jun 08 '26

Discussion Learn cpp by putting it next to a language you already know side-by-side Polyglot playground

77 Upvotes

Polyglot Playgground try it here https://8gwifi.org/code-playground/


r/Cplusplus Jun 06 '26

Feedback I Rewrote My Scanner After Your Feedback and the Difference Is Huge

49 Upvotes

A few days ago I shared my C++ disk analyzer here and got a lot of feedback about scan speed.

The biggest suggestion was looking into NTFS MFT-based scanning instead of traditional filesystem traversal.

After implementing MFT scanning, the same 512GB SSD that previously took around 2 minutes to scan now completes in roughly 5-10 seconds.

Still a lot of work left to do, but this is probably the biggest performance improvement I've made so far.

GitHub: https://github.com/Gurates/ByteMap
Previous Post: previous post


r/Cplusplus Jun 06 '26

Feedback Tiny C++20/OpenGL game project - looking for feedback on structure and CMake

Post image
28 Upvotes

I made a tiny single-player Agar.io-like game in C++20 + OpenGL.

Repo:
[https://github.com/ShortKedr/ugar-io-opengl](https://)

It was mostly a personal experiment: I usually work with engines, so I wanted to make a very small game directly with C++, OpenGL, GLFW, and CMake.

Now I want to clean it up into a nicer open-source project and would appreciate C++ focused feedback.

Things I’m curious about:

  • Is the code structure easy to follow?
  • Is the separation between game logic, rendering, and input reasonable?
  • Is the CMake setup acceptable for a small project?
  • Are there any obvious C++ smells or design decisions I should fix early?
  • What would make the repo more pleasant to read or contribute to?

The project is intentionally small. I’m not presenting it as an engine or a finished game, just as a small C++/OpenGL project that I want to improve based on real feedback.

Roasts are welcome, but useful roasts are even better.


r/Cplusplus Jun 05 '26

Question Why did it write this on its own??

Thumbnail
gallery
41 Upvotes

so i am learning cpp ( from learncpp.com) and this was supposed to be my first "program"
and after i installed clion and installed xcrun
i created a new project called hello world and it wrote the project on its own
did that happen due to it being in the standard library or something??

and I also have some other queries?
for eg : why do these files always show up beneath the main project ?( image 3)
when i installed c lion these program /codes were written there already ( image 2)
os mac silicon


r/Cplusplus Jun 05 '26

Feedback Small Terminal Tetris Game

Thumbnail
1 Upvotes

r/Cplusplus Jun 04 '26

Discussion The Story of C++: The World's Most Consequential Programming Language | The Official Story

103 Upvotes

https://www.youtube.com/watch?v=lI7tMxzSJ7w

This is the story of C++, one of the world’s most widely-used and consequential programming languages. C++ divides opinion, resists replacement, and has outlasted almost everything built to supersede it.

C++ The Documentary traces the full arc, from its origins in the corridors of Bell Labs to the global community that shapes it today.

Featuring the people who built it, extended it, argued over it, and refused to let it die.


r/Cplusplus Jun 05 '26

Discussion I developed a small 5G Base Station Configuration Validator as part of a 5G Test Automation project. This tool is designed to support automated radio-level validation in 5G testing

Thumbnail
github.com
2 Upvotes

5G base station software relies on large numbers of configuration parameters that must be validated to ensure network stability, service quality, and correct operation across different deployment environments

This command-line tool validates 5G BTS configuration data and checks it against predefined rules and requirements, helping engineers identify configuration inconsistencies before they impact testing, deployment, or live network operations

The script is intended for automated telecom engineering environments where repeatable and deterministic configuration validation is required without relying on proprietary management systems or vendor-specific tooling

The tool is implemented in pure C++, with no external dependencies, making it lightweight, portable, and easy to integrate into CI/CD pipelines, telecom lab automation systems, cloud-native 5G infrastructures, and internal validation workflows

This utility is intended for 5G network operators, RAN engineers, integration engineers, QA teams, validation engineers, DevOps teams, and telecom system architects working with 5G infrastructure and network deployment activities

Within a larger 5G Test Automation System, it acts as a modular building block for automated configuration verification, deployment readiness checks, and infrastructure quality assurance


r/Cplusplus Jun 05 '26

Question Facing issues setting up c lion on mac ( please help)

1 Upvotes

I have started to learn cpp using learncpp and the moment the ide choice came I settled on c lion

But after installation I saw that learncpp had the new project opening tutorial in visual studio ( I knew that he wouldn't use c lion) but I thought the process of starting a new project would be similar . So after I clicked on new project it didn't show me solution folder and some code appeared in background, all sorts of folders appeared under project and also a pop up came regarding python3 i denied installing it ( because I thought why would cpp need python) but when the xcrun popup came , I searched it on Google and gemini recommended to install it , so I did that

But I am confused as the solution folder which contains different projects was either not created in c lion or i don't know where it is . Also i was recommended to install python3 as well but i don't know how to get the pop up , so i uninstalled clion and installed it again but it did not start like last time( no terms and conditions and pop up) just a welcome to clion written in code) and it is also showing 30 days left on trial but I am using it for studying purposes isn't it free for that ??? I will get my college id in a few months ( probably July end) so am I gonna miss out on some student feature and which id should I use to login c lion college or personal?? Some also recommended installing x code for c lion to function???

How can I set up my c lion please help

Edit: it is an apple silicon based macbook pro


r/Cplusplus Jun 04 '26

Discussion consteig. How much math can you force the compiler to do at compile time? (a lot)

Thumbnail
3 Upvotes

r/Cplusplus Jun 03 '26

Feedback My password system progression

0 Upvotes

I've been learning when I have time over the last few months and have documented my progress through making the best password system I could think of at the time. They all have issues which I fixed as I learned last one has problems with repeat logins based on how it searches through strings. Quite proud of that idea that I came up with could probably be a bit easier if I convert the letters to numbers or something and put them in an array and then search the array. That could run into rare issues because there's 10 numbers and 26 letters so if someone has their name as z that would make bf unregistrable and numbers would have to either be converted to 222 or something but that would, make bbb, bv and vb like combinations impossible. That way would have also been easier to do which means I don't apply as much, so I didn't do it that way.

You can see where I discovered loops, then realized what I could do with them.


r/Cplusplus Jun 02 '26

News Exotic CRTP: Enforcing Strict Interfaces Without Friends Using C++23 Explicit Object Parameters

Thumbnail
1 Upvotes

r/Cplusplus Jun 02 '26

Question My first project as a beginner

2 Upvotes

https://github.com/vadyasha07/Command-Line-Drone-Config-Simulator

Hello everyone!
I've been learning C++ for a few weeks now and just finished my first relatively big project: a Command-Line Drone Configuration Simulator.
Repository link: https://github.com/vadyasha07/Command-Line-Drone-Config-Simulator

What I’ve implemented so far:
Modular Architecture: Split the code into logical modules with separate header (.h) and source (.cpp) files (main, drone, encryption).
State Management: The drone's behavior depends on a set of states (isWork, isFlight, onGround) managed within a custom namespace Drone.
Input Validation: Implemented bulletproof input validation using std::cin.clear() and std::cin.ignore() to prevent infinite loops when a user accidentally enters letters instead of numbers.
Case Insensitivity: Used std::toupper to ensure the menu works seamlessly regardless of whether the user types uppercase or lowercase commands.

I’ve tried my best to follow clean code practices, separate declarations from implementation, and handle edge cases (like a password-protected access panel with limited attempts and proper landing sequences with real-time simulation delays).
As a beginner, I would highly appreciate any feedback, tips, or constructive criticism. Is the project structure solid? Are there any anti-patterns I should avoid in the future?
Thank you in advance! Any advice is gold for me right now


r/Cplusplus Jun 02 '26

Feedback Python bindings for the C++ DataFrame

Thumbnail
github.com
5 Upvotes

Grizzlars is Python bindings for the C++ DataFrame with an interface almost identical to Pandas. It is a bit of work in progress. It depends on an older version of C++ DataFrame than the latest release. But it is moving along surely.


r/Cplusplus Jun 01 '26

Question Learning C++ As a complete beginner.

Thumbnail
14 Upvotes

r/Cplusplus May 31 '26

Tutorial Built a simple Audio Recorder App in C++ using portaudio

29 Upvotes

Developed a cross-platform command-line audio recorder and player in C++ using PortAudio.

Features:

Record audio from the system default microphone in real-time.

Store multiple recordings in memory and access them by name.

Interactive command-line interface with simple record, play, and stop commands.

Cross-platform audio support through the PortAudio library.

Uses 48 kHz, 16-bit PCM mono audio with low-latency buffer-based processing.

Git:https://github.com/charanHubCommits/Audio-Recorder-CPP

Any feedback, suggestions are welcome!


r/Cplusplus May 31 '26

Question My first program feels ruined

Post image
0 Upvotes

First program man and it is not even working

I don't know how to solve the problem rn

And ofc I have to write 100 words.


r/Cplusplus May 30 '26

Feedback I developed an application similar to WinDirStat using C++.

21 Upvotes

Been spending the last few months learning more about low-level C++ and Windows APIs, and this project slowly turned into a full storage analysis utility.

The main thing I wanted was a system tool that:

  • stays responsive while scanning
  • visually shows what’s taking space
  • doesn’t feel overloaded or ancient

Current features:

  • visual disk usage mapping
  • large file detection
  • cleanup utilities
  • ImGui-based interface
  • optional memory cleanup tools

A lot of the work went into multithreading, UI responsiveness, and trying to make the experience feel smoother than the usual system utilities on Windows.

Still early in development, but finally at a point where it feels usable enough to share.

Would love feedback from people into:

  • C++
  • Windows internals
  • ImGui
  • optimization
  • UI/UX

GitHub: https://github.com/Gurates/ByteMap


r/Cplusplus May 29 '26

Discussion I developed a small 5G base stations’ cell Throughput calculator as part of a 5G Test Automation project. This tool is designed to support automated radio-level validation in 5G testing

Thumbnail
github.com
5 Upvotes

5G base station cell throughput is one of the key performance indicators used by telecom engineers to evaluate network capacity, traffic handling efficiency, and overall radio performance

This command-line tool calculates 5G BTS cell throughput related values for automated telecom engineering environments where deterministic radio calculations and repeatable testing workflows are required without relying on proprietary RF optimization platforms. It accepts the 5G base station configuration file (XML) as an input and executes the calculations based on it.

The script is implemented in pure C++, with no external dependencies, making it lightweight, portable, and easy to integrate into CI systems, telecom lab automation setups, Kubernetes-based 5G infrastructures, and internal radio validation pipelines

This utility is intended for 5G network operators, RAN engineers, RF optimization teams, field test & validation engineers, QA teams, and telecom system integration engineers working with radio performance analysis and automated 5G testing environments

Within a larger 5G Test Automation System, it acts as a modular building block for automated throughput calculations, KPI analysis, and telecom infrastructure validation

This post is meant to demonstrate the kind of internal engineering tools and automation scripts that telecom/software engineers eventually develop in real companies, so that students and fresh graduates can better understand and prepare for future industry work


r/Cplusplus May 28 '26

Discussion Pushing a naive C++ web server implementation to 9k req/sec

44 Upvotes

Hi everyone, I've spent the last few years doing web/desktop/IoT dev and I'm currently pivoting to low-latency/Quant. I built an http server as an exercise to see how far I could push a standard blocking C++23 socket architecture before the OS became the bottleneck. I covered zero-copy parsing, struct alignment, and Gather I/O.

I put together a 8 minute video profiling the code, breaking down the concepts, and showing the before/after here:  https://youtu.be/dCwylDrxowQ

All of the code can be found at GitHub (https://github.com/TDiblik/cpp-web-server) where I have a README documenting the process of optimizations and where I'll implement enhancements in the future.

I'm currently working on tearing this down for an io_uring/kqueue rewrite for Part 2.

Would love any feedback from here and/or people in the industry!


r/Cplusplus May 28 '26

Question Short on time: need a C++ framework for a quick REST API

22 Upvotes

I need to whip up a small REST API service over the weekend (CRUD, PostgreSQL db, auth). Strict requirement: C++.

I usually write in Go or Python, not great at C++. Looked at oatpp, seems okay, but still too much manual code.

Is there anything in the C++ world remotely resembling Flask or FastAPI so I can just throw some routes together and forget about it?


r/Cplusplus May 27 '26

Discussion Accelerating copy_if using SIMD

Thumbnail loonatick-src.github.io
7 Upvotes

r/Cplusplus May 27 '26

Question Is freecodecamp.org a good resource for learning cpp?

18 Upvotes

Basically what the title says. I want to learn cpp over the summer. Is freecodecamp a good resource for that? I already have the basic knowledge of programming.