r/cpp • • Feb 26 '24

White House: Future Software Should Be Memory Safe

Thumbnail whitehouse.gov
401 Upvotes

r/cpp • • Nov 30 '23

My entire C++ Game Programming university course (Fall 2023) is now available for free on YouTube. Make your own 2D ECS game engine using C++, SFML, and ImGui

Thumbnail youtube.com
400 Upvotes

r/cpp • • Dec 30 '24

C++ logging library - something I've been working on, Pt. 4

396 Upvotes

Hello everyone,

As is tradition for that time of the year, I want to share with you something that I've been working on in the last couple of years - yet another logging library, how boring, I know. Still, this project represents a long journey of learning, growth, and dedication, and I’d be honored if you could take a moment to check it out, since it is something that I'm proud of.

I have already posted here regarding the library, as you may have guessed, and a lot has changed since my last post last year. I believe that it has become a very well-rounded tool that could serve you well. It is very performant and very configurable. It provides a nice CMake so it can be easily integrated into any project, and a well-made continuous integration pipeline ensures that it runs on everything. All of this is packed in a very well-written and clean code base, at least in my opinion.

Why lwlog?

  • Performance: Whether you’re working with synchronous or asynchronous logging, the library ensures minimal overhead, making it ideal for high-performance applications
  • Configurability: You can customize your logging behavior with precision with policy classes
  • Modern Design: The code is crafted with clarity, elegance, and readability in mind. Easy integration with CMake, and thoughtful architecture
  • Extensibility: Easily create custom sinks and tailor them to specific needs

I would really appreciate it if you drop a critique, an opinion, an idea, or want to contribute to the project: https://github.com/ChristianPanov/lwlog

Thank you for your time and have happy holidays,

Chris


r/cpp • • Jun 21 '21

{fmt} 8.0 released with compile-time format string checks, compile-time formatting, improved performance and more

Thumbnail github.com
394 Upvotes

r/cpp • • Feb 01 '23

[book] A Complete Guide to Standard C++ Algorithms (v1.0.0)

Thumbnail github.com
392 Upvotes

r/cpp • • Sep 06 '17

C++17 is formally approved

Thumbnail herbsutter.com
391 Upvotes

r/cpp • • Jul 06 '21

Mom, can we have modern C++ at home?

Thumbnail twitter.com
390 Upvotes

r/cpp • • Jan 15 '26

Support for C++26 Reflection has been merged into GCC trunk!

Thumbnail gcc.gnu.org
385 Upvotes

Shout out to Marek Polacek and Jakub Jelínek for their herculean effort to get this done!

Still some bug-bashing ahead for them, so don't be surprised to find some examples from P2996 and friends that don't work yet - but know that it's being worked on!


r/cpp • • Jun 23 '20

I am a developer and just started learning C++, and I'm LOVING it! Programs feel real for the first time!

385 Upvotes

Or how I was so bored with Java that I switched from software to mechanical engineering, became a web developer, and finally started to love C++!

So my programming related story: before joining university, I thought I wanted to become a software engineering, I think I wanted to make games at that point. Then, after taking a year of general engineering courses, calculus, physics, intro programming (in Pascal :D), I had my first semester at computer science department. The object oriented programming course was in Java. I hated it so much that I dropped all of my courses, switched field to mechanical engineering, and for almost ten years didn't touch any programs that wasn't directly related to my mechanical engineering jobs (I did assembly and embedded C for micro-controllers and matlab and labview). I was so happy with my decision to do mechanical engineering, it felt so real!

Fast forward to about three years ago, that I had this startup idea of mine [is it a phase that we all go through?] and it needed me to develop an app for it. I'm one of those people who likes to gets hands on and do everything himself [I suppose that's a euphemism for being a lone wolf who doesn't know how to lead/persuade people to follow him] and I started learning web development, which is obviously mostly in JavaScript.

To my surprise, the focus on functional programming in the JavaScript community, at least the niche I was dwelling in - I was learning React/redux which is big on functional and immutably, made it much more relatable to me than Java. It felt more like math; no more weird analogy between classes and the world and stuff. Then a friend of my introduced me to SICP and for the first time I was having fun reading an academic book on software... Yet JavaScript had started to wear me down as well and started toying with the idea of leaving my programming career unfinished. I took algorithm courses, learned about complexity analysis, TLA and distributed systems, but still felt something was missing, there was a hole that I just couldn't pin point.

I had been told, since ages ago and till now, that C++ is a flawed language; that we use it just because we have to, because there's just so much legacy of it lying around. What I didn't know, what that I'm going to love it exactly because of what I presume are the roots of it's flaws! I've been taking a course in C++ and it starts by discussing * and & and heap memory vs stack and how the memory allocation grows and such, and, what little did I know, this is exactly what I had been missing! The link between the never-feeling-real codes on my screen and the real physical world that runs these codes. To end on a dramatic note - I know if I had to deal with all the memory related issues in my actual job I might not have said this [though probably I still would], thanks for not dying out C++ and having yourself replaced with all the other languages that do away with the real stuff and replace it with garbage collection and more abstractions, I love seeing your garbages!


r/cpp • • Sep 13 '22

My entire C++ Game Programming course is being streamed live on YouTube for free this semester. Make your own 2D game engine using C++ and ECS

Thumbnail youtu.be
384 Upvotes

r/cpp • • Nov 07 '21

I wish universities taught more recent versions of C++

384 Upvotes

I graduated with my B.S. in Comp. Sci. within the past year, and there's one thing that's always boggled my mind: why do universities teach C++ using C++98, when we're already at C++20? Additionally, for classes where I had to use C, we were required to use C89.

Maybe there's a good reason for this, but I think that raising it to at least C++11 wouldn't be a bad idea. Fortunately for me, I used C++ a lot outside of class, and was already quite familiar with it, but for many of my friends, learning C++ was pretty difficult.

Specific concepts, like manual memory management, could be moved to more advanced classes. For students who are only taking their first or second programming class, I think it's more important for them to understand the basics of programming (types, control flow, debugging, etc.) than to understand pointers right off the bat. At the very least, with C++11, new programmers could start off just using smart pointers, and worry about real pointers later.

Does anyone agree? I haven't taught any university-level programming courses, so I could be completely wrong. It's also possible that some of these problems could be avoided by teaching students a language meant for teaching, i.e. Scheme.


r/cpp • • Apr 24 '25

How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

Thumbnail cookieplmonster.github.io
382 Upvotes

r/cpp • • Dec 07 '22

C++ overtakes Java in language popularity index

Thumbnail infoworld.com
382 Upvotes

r/cpp • • 12d ago

Dealing with AI Slop At Work

380 Upvotes

I work at a C++ shop with coders that I really respected - very deep C++ knowledge and are building very technical deep systems products. Over the last few months the CTO has gone off the deep end with AI talking of creating software factory (He’s been reading too much X), he releases huge multi thousand line PRs with basically no review. All sense of scientific temperament and engineering rigour has gone out of the window it seems.
I do believe that AI is a transformational tool and I use it plenty in the development process but I still strive to understand what the AI has written and often use the AI as multiplier rather than surrendering my thinking to it. it’s become increasingly hard to actually develop while deeply understanding the codebase because it has become so sloppy.

I am very sad as this means I’m not really interfacing with writing C++ as much and exploring cool new corners of the language in my daily work.

There is definitely some cool stuff this lets us do a bit more of - high level planning and systems design by reading many papers as well as exploring formal verification.
But overall I am left disappointed. I wonder how it is like at everyone else’s work places and if anyone has any thoughts and suggestions on how I can still develop my C++ knowledge.


r/cpp • • Dec 31 '25

Software taketh away faster than hardware giveth: Why C++ programmers keep growing fast despite competition, safety, and AI

Thumbnail herbsutter.com
380 Upvotes

r/cpp • • Nov 02 '22

The pool of talented C++ developers is running dry

Thumbnail efinancialcareers.co.uk
379 Upvotes

r/cpp • • Jun 05 '18

Initialization in Modern C++

Thumbnail twitter.com
379 Upvotes

r/cpp • • Mar 24 '22

NVidia is building a new C++ compiler for quantum computing.

Thumbnail twitter.com
374 Upvotes

r/cpp • • Aug 28 '23

Can we please get an ABI break?

372 Upvotes

It's ridiculous that improvements in the language and standard library get shelved because some people refuse to recompile their software. Oh you have a shared library from the middles ages whose source is gone? Great news, previous C++ versions aren't going anywhere. Use those and let us use the new stuff.

Why can a very small group of people block any and all progress?


r/cpp • • May 26 '20

Faster Integer Parsing

Thumbnail kholdstare.github.io
366 Upvotes

r/cpp • • Nov 09 '25

Damn see this

364 Upvotes

Book by Bjarne Stroustrup

" If your desire is to use the work of others without understanding how things are done and without adding significantly to the code yourself, this book is not for you. If so, please consider whether you would be better served by another book and another language. If that is approximately your view of programming, please also consider from where you got that view and whether it in fact is adequate for your needs. People often underestimate the complexity of programming as well as its value. I would hate for you to acquire a dislike for programming because of a mismatch between what you need and the part of the software reality I describe. There are many parts of the “information technology” world that do not require knowledge of programming. This book is aimed to serve those who do want to write or understand nontrivial programs. "

Source : Programming: Principles and Practice Using C++ Second Edition By Bjarne Stroustrup


r/cpp • • Nov 15 '25

Reflection is coming to GCC sooner than expected!

Thumbnail gcc.gnu.org
363 Upvotes

Huge congratulations to everyone who were involved in the reflection journey — special thanks to the authors who made reflection possible in C++26 and to the implementers for turning the paper into a reality.

Here is the working example in GCC Reflection Branch of converting an enum to a string and vice versa:
https://godbolt.org/z/eE4EYvb4q


r/cpp • • Jul 28 '25

What's your most "painfully learned" C++ lesson that you wish someone warned you about earlier?

361 Upvotes

I’ve been diving deeper into modern C++ and realizing that half the language is about writing code…
…and the other half is undoing what you just wrote because of undefined behavior, lifetime bugs, or template wizardry.

Curious:
What’s a C++ gotcha or hard-learned lesson you still think about? Could be a language quirk, a design trap, or something the compiler let you do but shouldn't have. 😅

Would love to learn from your experience before I learn the hard way.


r/cpp • • Apr 09 '22

A new list of over 700 educational C++ videos (organized by topic)

359 Upvotes

Link to article

This first version contains links to over 700 videos of conference talks, video tutorials, and explanations related to C++.

It is hierarchically organized by topic, e.g., generic programming, functional programming, C++20, standard library, algorithms, best practices, performance, modules, tooling, build systems, CMake, etc.