/r/cpp
Discussions, articles and news about the C++ programming language or programming in C++.
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
/r/cpp
I’m including multiple third party libraries in my code, but when it comes to project organization—beyond not including in multiple parts of the code— I’m not as skilled. Sometimes I might include a library for front end graphics, or for encryption or networking, but then I find that I get errors popping up which indicate that I can’t integrate those libraries because they don’t implement native c++ types.
I’m just curious what people consider good/best practices for including multiple libraries . Do you create handlers for different types? Is there a method/std function for changing native types into those compatible with third party libraries? If you have any projects you’re working on where you can give examples of your project structure I’d love to see and hear what your approach would be.
Can I say.. reflect on a void pointer returning members and then my execute a method on that pointer? Will I ever be able to?
I found on github this project: https://github.com/EpicGamesExt/raddebugger. It is a debugger for C++ in windows. Someone knows it? What do you think about that? Can really replace the visual studio debugger?
Use this thread to share anything you've written in C++. This includes:
The rules of this thread are very straight forward:
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/1ftoxnh/c_show_and_tell_october_2024/
I used to have the Visual Studio Blog and C++ Team Blog in my RSS feed. In the past year or two, it's been flooded with marketing, Copilot and Unreal stuff, with very few news about C++ features or standard library changes. I swear I used to get articles about new previews, changelogs from the standard library, etc.
Is there another blog on the Microsoft website, or is it just gone?
I just published a blog post that might interest those of you working with data-heavy applications or game engines. Over the past few months, I’ve been developing a custom C++ serializer tailored for handling complex game components and making the serialization process more efficient and readable.
The post dives into:
Vector2D
, Vector3D
, and ModelInfo
.Check it out here: Building a Custom C++ Serializer for Efficient Data Handling
Would love any feedback or thoughts! And if you’re interested in serialization or working on similar projects, let’s connect!
Any news on MSVC C++23 compiler support? This is the end of 2024 ;)) I know there is something like this https://learn.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance, and as we can see practically no feature of 23 standart is supported yet, most of STL is implented tho.
I recently received an offer from ASML for a C++ developer role. I had cleared all the interview rounds confidently, and I have 3 years of relevant work experience, having worked in a similar domain. The offer was around 50-55k euros per year.
Honestly, I felt like it wasn’t a fair offer given my experience and background, so I ended up rejecting it. Now
I'm curious about the community’s perspective.
Was the offer reasonable for someone with my experience, or was I right to feel it fell short? Would love to hear your thoughts and insights on how competitive this offer is in the market. Because honestly I am receiving offers way above this number and was surprised ASML was one of the lowest so far.
Hey all. I’ve been a dedicated C programmer solely for its simplicity and control, but I’m wanting to head into CPP just because it is professionally much more common. I come from an embedded background but I’m still a young programmer (been seriously coding for a little more than 5 years).
I have two questions:
With already having a background in programming, what would be the most notable language differences between C and CPP that I should quickly familiarize myself with? (Id prefer to skip obvious things like classes, abstract classes, interfaces, learned OOP in school, but if you think those are important, please do reiterate!)
Is there a general resource for CPP best practices that also describe how we get that best practice from CPP’s language design? This could also include compiler reasons, abstraction, readability, and other reasons too I guess.
This Reddit post will now be a roundup of any new news from upcoming conferences with then the full list now being available at https://programmingarchive.com/upcoming-conference-news/
Scanlib was proposed to be standardized in C++26. Does anyone know anything about its process? What's the status?
Any news?
I couldn't find anything related on the website.
Hello, fellow C++ developers!
I'm currently working on a game with SDL3 to get better with c++ and game dev in general.
I'm struggling with how to handle ownership and lifetime management for actors.
Actors are the main GameObject currently. And I spawn them through a world class. The world class currently has a std::vector<std::unique_ptr<Actor>> InstancedActors; Now for references I am currently using std::reference_wrapper. I decided for unique_ptr in the world class because I want the world to have full ownership of all actors spawned.
However, I'm worried about how these references will behave if the underlying actors are destroyed, as std::reference_wrapper does not provide any nullification or safety checks. In my head using shared_ptr in the world class also makes no sense since I only want the world class to have ownership of the actors.
Any insights or suggestions would be greatly appreciated! Thank you!
ADC
ADCx Gather VOD - https://youtube.com/live/p1wwR9bOx0A
C++OnSea
2024-10-28 - 2024-11-03
ACCU Conference
2024-10-28 - 2024-11-03
C++Now
CppNorth
Hello. In my free time i try(and fail) to program video games in C++.
I started hating the IDE because they are really really slow. Open it, edit a file, see they lags, it's really annoying to me. In other they abstract some problems, and i think that now to grow is necessary to get rid of this help. For example, i have never compiled a C++ program from command line, because Visual Studio do it for me. Imagine when i need to pass some options for the compiling to the compiler or link a dll or understand how C++ compile a more complicate project, seeing that in abstract way i have never understood this things. So i want to get rid of Visual Studio, but i am struggling to find options.
What we suggest to me to use to compile C++? CLang? MingGW? How i can debug my code in a decent interface without Visual Studio? Can i use gdb on text editors like emacs? Is it ugly?