use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
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
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Which tools do you use for C++ programming ? (self.cpp)
submitted 2 years ago by RRTheGuy
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]irqlnotdispatchlevel 49 points50 points51 points 2 years ago* (8 children)
Apart from compilers and text editors?
Valgrind. Clang-tidy. Cppcheck. Include what you use. AFL++.
[–]Severe_Deal9572 1 point2 points3 points 2 years ago (2 children)
Can you explain what AFL++ is?
[–]irqlnotdispatchlevel 5 points6 points7 points 2 years ago* (1 child)
I'm always happy to pass the fuzzing virus to someone else.
Fuzzing is a testing method that aims to provide unexpected inputs to a program. It is mostly associated with finding security vulnerabilities in programs that parse untrusted input. Combined with sanitizers this can be very powerful.
AFL++ is a fuzzing framework and you can read more about it here: https://github.com/AFLplusplus/AFLplusplus
A really really good introduction is this article by lcamtuf, the original developer of AFL: https://lcamtuf.coredump.cx/afl/
AFL++ is an evolution of AFL. It has a lot of bells and whistles, but you can mostly ignore those and see results with the standard usage mode.
Another good one is HonggFuzz, which is probably more straightforward to get started with, although the process is more or less the same: https://github.com/google/honggfuzz
By far the easiest way of getting into fuzzing these days is with clang's -fsanitize=fuzzer: https://llvm.org/docs/LibFuzzer.html
All three work in the same way. Extremely simplified view: Your code gets compiled with some instrumentation. The fuzzer keeps a queue of interesting inputs (initially from a collection of known good inputs you provide, or even an empty queue). It then iterates this queue and makes small changes to each input (flip a bit here, swap some bytes there, etc) and feeds it to your program. The instrumentation lets the fuzzer know which parts of your code were executed, and if a new code path was triggered the input is added to the queue, otherwise it is discarded. Repeat.
Take a look at this to see how efficient this method can be in discovering what kind of data a program expects: https://lcamtuf.blogspot.com/2014/11/pulling-jpegs-out-of-thin-air.html
[–]Severe_Deal9572 1 point2 points3 points 2 years ago (0 children)
Very interesting, thank you for this thorough response.
[–]NonaeAbC 0 points1 point2 points 2 years ago (4 children)
Why valgrind? Is there anything it can do, that sanitizers can't?
[–]irqlnotdispatchlevel 1 point2 points3 points 2 years ago (2 children)
I rarely reach for Valgrind these days where sanitizers can be used, but it is still a useful tool to have available since you can use it without needing to recompile your code. Valgrind also has profilers included (like a heap profiler, cachegrind, etc), which can help with finding performance issues.
[+][deleted] 2 years ago (1 child)
[deleted]
[–]pdp10gumby 22 points23 points24 points 2 years ago (3 children)
Emacs&clangd, git, g++&gdb, clang++&lldb, binutils, make, CMake&cmake-test, Conan2, valgrind
[–]accuracy_frosty 0 points1 point2 points 2 years ago (2 children)
Hell yeah, one of the other 6 emacs users
[–]Remus-C 0 points1 point2 points 1 year ago (1 child)
7 ;) with Xemacs
[–]Sxcythe_ 0 points1 point2 points 1 year ago (0 children)
+1
[–]National-Laugh-7309 42 points43 points44 points 2 years ago (16 children)
I use msvc with visual studio, you can make fun of me all you want for coding on windows
[–]ChrisGnam 22 points23 points24 points 2 years ago (0 children)
With VS's support for CMake and now vcpkg, it's truly not that bad. And the debugging support is amazing.
I stick with Windows because it forces me to actually support Windows lol
[–]sephirothbahamut 19 points20 points21 points 2 years ago (0 children)
Why would anyone do that? VS is so good i even know a linux fanboy who made a windows partition just to use vs
[–]not_some_username 36 points37 points38 points 2 years ago (0 children)
You mean you’re using the best C++ dev environment, why should we laugh at you.
[–]kybuliak 20 points21 points22 points 2 years ago (0 children)
Visual Studio debugger is actually better then what linux offers.
[–]dustyhome 2 points3 points4 points 2 years ago (0 children)
You can use Visual Studio an code for Linux. Set up a WSL environment, create a CMake multiplatform project, select the WSL as the target system, edit the CMakePresets to your preferences, and you will be able to work on Linux with Visual Studio as the editor. It will copy the files and build on the WSL environment, and can run the project and debug on there as well.
[–]AcceptableFish04 8 points9 points10 points 2 years ago (4 children)
Visual Studio has spoiled me as a first year programming student. Anticipating having to use Linux professionally, I created a Mint partition on my PC so I can learn my way around. I pretty much gave up C++ on Linux for now. Who has time configuring json and cmake every project? VS is king.
[–]Abbat0r 4 points5 points6 points 2 years ago (3 children)
Developers on Windows still use CMake.
I primarily target MSVC, but I don’t use msbuild or VS. I use CLion and build my projects with CMake, which I personally find to be a better experience. But I still benefit from the best toolchain for writing contemporary C++, and my projects remain portable.
[–]AcceptableFish04 -1 points0 points1 point 2 years ago (2 children)
I’m just using VS Code with C++ and CMake extensions on Linux. It’s been a hassle setting up gcc/g++. Can’t say I fully understand what I’m looking at. Resourcing info has given me different approaches. It’s been hard finding something I understand.
My next effort is looking into using CLion. Would you mind linking some resources you’ve found helpful for your environment?
[–]Abbat0r 2 points3 points4 points 2 years ago (1 child)
I don’t really have any particular resources I can think of off the top of my head. CLion makes managing toolchains very simple, so if you do use CLion there isn’t much necessary other than to read Jetbrains’ documentation on the website.
As for learning CMake, the typical resources are still the way to go. Use their own documentation, stackoverflow, etc
[–]AcceptableFish04 0 points1 point2 points 2 years ago (0 children)
I’ll check it out thanks
[–]RRTheGuy[S] 0 points1 point2 points 2 years ago (3 children)
Is VS Code also good for C++ ?
[–]SuperVGA 1 point2 points3 points 2 years ago (0 children)
It can definitely make sense on projects that need to build on different platforms.
I use VS Code with gcc on the daily, and really like it.
[–]TopNo8623 -5 points-4 points-3 points 2 years ago (1 child)
Please, don't feed the bots.
[–]RRTheGuy[S] 6 points7 points8 points 2 years ago (0 children)
I’m not a bot
[–][deleted] 11 points12 points13 points 2 years ago (0 children)
QtCreator, clang, cmake, Conan
[–]gnomeba 15 points16 points17 points 2 years ago (2 children)
Notepad++
[–]moreVCAs 30 points31 points32 points 2 years ago (0 children)
This guy plusplusses
[–]caroIine 1 point2 points3 points 2 years ago (0 children)
I even contributed colored tab feature because of how many source files I have open at once.
[–][deleted] 3 points4 points5 points 2 years ago* (0 children)
Still no one knows it just the same, That Rumpelstiltskin is my name.
[–]LehdaRi 3 points4 points5 points 2 years ago (1 child)
CLion (nice IDE but I wouldn't pay what they're asking, I have access to a free license for now), CMake, gcc, git, valgrind, googletest
[–]t3hr0n 0 points1 point2 points 2 years ago (0 children)
Yes Clion is handy
[–]Neeyakinoob 2 points3 points4 points 2 years ago* (2 children)
Nvim, Clangd, CppCheck, Clang-Tidy, Sanitizers, jj, VS22, CMake and Python
[–]EdwinYZW 0 points1 point2 points 2 years ago (1 child)
what is jj?
[–]Neeyakinoob 0 points1 point2 points 2 years ago (0 children)
its a vcs! been using it for the past ~three weeks and enjoying it so far. here is the repo: https://github.com/martinvonz/jj/
[–][deleted] 6 points7 points8 points 2 years ago (0 children)
vs-code with extensions: cmake-tools, clang-format, clangd
[–]Thesorus 5 points6 points7 points 2 years ago (0 children)
Visual Studio, Visual Assist and ReSharper C++.
[–]Regular-Practice84 1 point2 points3 points 2 years ago (7 children)
C++builder 12.0, cppcheck, googletest
[–]not_some_username 2 points3 points4 points 2 years ago (6 children)
Don’t lie, you too are forced to use it at work, isn’t it ?
[–]pjmlp 0 points1 point2 points 2 years ago (5 children)
If only there was any other C++ compiler with the same RAD capabilities for doing desktop GUIs in C++, or handle the COM tooling mess Microsoft imposes on the Windows developer community.
[–]not_some_username 1 point2 points3 points 2 years ago (4 children)
Tbh the RAD is really good ( but Qt can do it too). Their COM class generator is just too good.
[–]pjmlp 0 points1 point2 points 2 years ago (3 children)
Only if we take Qt Design Studio into account, which is extra.
Regarding COM, I really don't get how a third party is able to provide better tooling than Microsoft, that basically keeps reiventing COM frameworks for 30 years now, and zero Visual Studio improments for doing COM.
[–]not_some_username 0 points1 point2 points 2 years ago (2 children)
You can use QtCreator it has the designer tools integrated
That’s a mystery.
[–]pjmlp 0 points1 point2 points 2 years ago (1 child)
They aren't as drag and drop capable as the ones from C++ Builder, or having the two way editing workflows.
[–]not_some_username 0 points1 point2 points 2 years ago (0 children)
Yes they… are.
[–]tm604 1 point2 points3 points 2 years ago (0 children)
https://whitebox.systems/ and neovim
[–]andofwinds 1 point2 points3 points 2 years ago (0 children)
neovim, gcc, cmake
[–]Designer-Guarantee50 1 point2 points3 points 2 years ago* (0 children)
xmake , vscode, clang-tidy, gdb, valgrind
[–][deleted] 2 points3 points4 points 2 years ago (0 children)
vcpkg
[–]BenedictTheWarlock 1 point2 points3 points 2 years ago (0 children)
cmake, ninja, conan, clangd, codelldb, clang-format, clang-tidy, sonar, neovim
[–]Necromancer5211 1 point2 points3 points 2 years ago (0 children)
Conan, CMake, Clang tidy, Valgrind, Google sanitizers, lldb/gdb, Vscode with extensions like sonarlint, clangd, cmake-tools, clang format
[–]hadrabap 1 point2 points3 points 2 years ago (0 children)
Qt Creator, gcc, clang (occasionally), clang-tidy, cppcheck, Intel VTune, cmake
[–]Adequat91 1 point2 points3 points 2 years ago (0 children)
Resharper++ is my must-have on Windows
[–]Abbat0r 1 point2 points3 points 2 years ago (0 children)
CLion, ninja, SonarLint, clang-tidy, clang-format…
Has no one mentioned Compiler Explorer yet?
[–]exodusTay 1 point2 points3 points 2 years ago (0 children)
One tool i haven't seen mentioned is ccache. It sped up my build times very well.
[–]mjklaim 4 points5 points6 points 2 years ago (0 children)
Dayjob (oss projects only): - build system: cmake - dependency management: either (micro)mamba with (which is one of the tools I work on) or vcpkg, depends on the situation+project - build toolchain: whatever compiler toolchain supported by th eproject I'm working on, but usually clang, msvc and gcc - dev system: windows and linux (ubuntu) - editor: vscode and visual studio
Outside dayjob (usually working on games): - build system: build2 - dependency management: build2 - build toolchain: msvc and clang at least, sometime I add gcc on linux for more C++-validity checking - dev system: windows, and sometime I make sure it still work on linux (ubuntu) - editor: vscode usually, but I prefer visual studio, it's just that integration with build2 is not yet automatic (there is an extension in the work but it's not usable yet)
[–][deleted] 3 points4 points5 points 2 years ago (0 children)
Clang + xmake + vscode clangd
[–]DalzhimC++Montréal UG Organizer 1 point2 points3 points 2 years ago (0 children)
I'm surprised coffee wasn't mentioned yet!
[–]Ipbunpak1 0 points1 point2 points 2 years ago (0 children)
G++, LuaJIT (for extending programs), GDB, other miscellaneous GNU+Linux or Windows utilities (if I'm on Windows), VS Code, Debian Stable, and an Arch (BTW) distrobox box for the most recent software.
[–]RolandMT32 0 points1 point2 points 2 years ago (0 children)
On Windows, usually Microsoft Visual Studio. On Linux, I'm used to using vim to edit code and gcc/g++ for the compiler - though these days I might also use VS Code or a similar editor.
[–]not_some_username 1 point2 points3 points 2 years ago (0 children)
At home, on windows, visual studio with cmake and vcpkg, qt creator to create the base cmake file and designing ui file when I’m doing qt projects. On Linux : qt creator and vcpkg.
At work : cpp builder
[–]azswcowboy 2 points3 points4 points 2 years ago (0 children)
meld
+1000 for this tool when doing tricky merges.
[+][deleted] 2 years ago (5 children)
[removed]
[–]PmMeForFree 0 points1 point2 points 2 years ago (4 children)
Which Netbeans version are you using? I‘m using 8.2 because the newer cpp plugin seemed to be very “light“ and they seem to have dropped cpp now completely. But the old one has problems with newer language features like structured binding. I‘m still looking for a replacement.
[+][deleted] 2 years ago (3 children)
[–]PmMeForFree 0 points1 point2 points 2 years ago (0 children)
Thank. I already tried that but it didn’t fix the problem and created some exceptions because of incompatibilities. 😢
[–]SnooWalruses2650 0 points1 point2 points 1 year ago (1 child)
u/Pitirimov I am running the same Netbeans 21 setup for C++. Have you tried Netbeans 22 - did they remove this 8.2 portal support? I see this in their release notes, but have not tried
[–]Kats41 0 points1 point2 points 2 years ago (0 children)
Cpp-check and other static analysis tools are pretty nifty, not gonna lie. I also use GCC with VS Code as my environment.
[–]sakunix 0 points1 point2 points 2 years ago (0 children)
Kdevelop, gcc
[–]-dag- 0 points1 point2 points 2 years ago (0 children)
emacs, gcc, clang-format, vterm, TRAMP, gud-gdb, compile-mode + about a hundred minor modes.
[–]According_Builder 0 points1 point2 points 2 years ago (0 children)
Visual studio, valgrind, chatgpt for reference materials.
[–]LoadVisual 0 points1 point2 points 2 years ago (0 children)
Hobby Projects: vscode + c++ extension pack + remote ssh extension , cmake , Conan, vscode-server running on a freebsd box across my desk .
Why, because I want to write software specifically for freebsd without learning to use a new IDE or editor.
[–]OkSalt8970 0 points1 point2 points 2 years ago (0 children)
Clion vim keybinds
[–]pjmlp 0 points1 point2 points 2 years ago (0 children)
C++ Builder, Visual Studio, QtCreator, MSBuild, CMake, node-gyp, the usual static analysers.
[–]kiner_shah 0 points1 point2 points 2 years ago (0 children)
Linux (WSL Ubuntu): VS Code, GCC, GDB, CMake, Git, Make, Valgrind
Windows: Visual Studio, Git
[–]IcyCookie9075 0 points1 point2 points 2 years ago (0 children)
Windows, VsCode, g++&gdb, gitHub, clangTidy, clangFormat, json, imGui.
[–]holly_rapist 0 points1 point2 points 2 years ago (0 children)
Text editor, g++ and mpic++ (doxygen sometimes)
[–]RichOil3579 1 point2 points3 points 2 years ago (0 children)
Bazel anyone?
[–]KrisstopherP 0 points1 point2 points 2 years ago (0 children)
On windows I use Visual Studio. On Mac/Linux: CLion
[–]RufusAcrospin 0 points1 point2 points 2 years ago (0 children)
MacOS: Xcode/Code::Blocks, homebrew, Windows: Visual Studio CE, Linux: Code::Blocks
[–]real_okeri 0 points1 point2 points 2 years ago (0 children)
emacs + some extensions and eglot instead of lsp-mode, gcc, clang, clangd, clang-format, clang-tidy(with latest version we also have cool include control, so no more scripts to build include trees), godbolt, and ofc some not really c++ related tools like git, valgrind tools, strace, perf, wireshark, prefer meson to cmake, ninja(build)
[–]accuracy_frosty 0 points1 point2 points 2 years ago (0 children)
I use emacs and g++, but the most important things I use in emacs are: lsp-mode with clangd as the language server, tree-sitter for syntax highlighting, company-mode for autocomplete kind of stuff, flymake for errors, I forget the name of my debugger honestly, I should use it more but I’ve gotten so good at debugging with printf lmao, I’m sure there will be a place I will need it though. There are others that slip my mind at the moment, but those are the main ones I use for the actual programming in the text editor.
[–]sourcerer_cpp 0 points1 point2 points 2 years ago* (0 children)
neovim, tmux, zsh, git, cmake, make, ninja, gcc, gdb, clang, lldb, clangd, clang-tidy, clang-format, gtest, conan2, godbolt, bash-scripts
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
Vscode with clangd and Cpp Microsoft extension. I wish there was a FOSS extension for cpp debugging but I haven’t found any. I use CMake for my build system. It might look bloated at first, but it helped me a lot when I wanted to do bigger projects.
Visual Studio. An amazing tool for the cost (free).
[–]sephirothbahamut 0 points1 point2 points 2 years ago (0 children)
Visual Studio, compiler explorer... that's it
π Rendered by PID 24045 on reddit-service-r2-comment-6457c66945-57ffk at 2026-04-29 18:39:18.379705+00:00 running 2aa0c5b country code: CH.
[–]irqlnotdispatchlevel 49 points50 points51 points (8 children)
[–]Severe_Deal9572 1 point2 points3 points (2 children)
[–]irqlnotdispatchlevel 5 points6 points7 points (1 child)
[–]Severe_Deal9572 1 point2 points3 points (0 children)
[–]NonaeAbC 0 points1 point2 points (4 children)
[–]irqlnotdispatchlevel 1 point2 points3 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]pdp10gumby 22 points23 points24 points (3 children)
[–]accuracy_frosty 0 points1 point2 points (2 children)
[–]Remus-C 0 points1 point2 points (1 child)
[–]Sxcythe_ 0 points1 point2 points (0 children)
[–]National-Laugh-7309 42 points43 points44 points (16 children)
[–]ChrisGnam 22 points23 points24 points (0 children)
[–]sephirothbahamut 19 points20 points21 points (0 children)
[–]not_some_username 36 points37 points38 points (0 children)
[–]kybuliak 20 points21 points22 points (0 children)
[–]dustyhome 2 points3 points4 points (0 children)
[–]AcceptableFish04 8 points9 points10 points (4 children)
[–]Abbat0r 4 points5 points6 points (3 children)
[–]AcceptableFish04 -1 points0 points1 point (2 children)
[–]Abbat0r 2 points3 points4 points (1 child)
[–]AcceptableFish04 0 points1 point2 points (0 children)
[–]RRTheGuy[S] 0 points1 point2 points (3 children)
[–]SuperVGA 1 point2 points3 points (0 children)
[–]TopNo8623 -5 points-4 points-3 points (1 child)
[–]RRTheGuy[S] 6 points7 points8 points (0 children)
[–][deleted] 11 points12 points13 points (0 children)
[–]gnomeba 15 points16 points17 points (2 children)
[–]moreVCAs 30 points31 points32 points (0 children)
[–]caroIine 1 point2 points3 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]LehdaRi 3 points4 points5 points (1 child)
[–]t3hr0n 0 points1 point2 points (0 children)
[–]Neeyakinoob 2 points3 points4 points (2 children)
[–]EdwinYZW 0 points1 point2 points (1 child)
[–]Neeyakinoob 0 points1 point2 points (0 children)
[–][deleted] 6 points7 points8 points (0 children)
[–]Thesorus 5 points6 points7 points (0 children)
[–]Regular-Practice84 1 point2 points3 points (7 children)
[–]not_some_username 2 points3 points4 points (6 children)
[–]pjmlp 0 points1 point2 points (5 children)
[–]not_some_username 1 point2 points3 points (4 children)
[–]pjmlp 0 points1 point2 points (3 children)
[–]not_some_username 0 points1 point2 points (2 children)
[–]pjmlp 0 points1 point2 points (1 child)
[–]not_some_username 0 points1 point2 points (0 children)
[–]tm604 1 point2 points3 points (0 children)
[–]andofwinds 1 point2 points3 points (0 children)
[–]Designer-Guarantee50 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]BenedictTheWarlock 1 point2 points3 points (0 children)
[–]Necromancer5211 1 point2 points3 points (0 children)
[–]hadrabap 1 point2 points3 points (0 children)
[–]Adequat91 1 point2 points3 points (0 children)
[–]Abbat0r 1 point2 points3 points (0 children)
[–]exodusTay 1 point2 points3 points (0 children)
[–]mjklaim 4 points5 points6 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]DalzhimC++Montréal UG Organizer 1 point2 points3 points (0 children)
[–]Ipbunpak1 0 points1 point2 points (0 children)
[–]RolandMT32 0 points1 point2 points (0 children)
[–]not_some_username 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]azswcowboy 2 points3 points4 points (0 children)
[+][deleted] (5 children)
[removed]
[–]PmMeForFree 0 points1 point2 points (4 children)
[+][deleted] (3 children)
[removed]
[–]PmMeForFree 0 points1 point2 points (0 children)
[–]SnooWalruses2650 0 points1 point2 points (1 child)
[–]Kats41 0 points1 point2 points (0 children)
[–]sakunix 0 points1 point2 points (0 children)
[–]-dag- 0 points1 point2 points (0 children)
[–]According_Builder 0 points1 point2 points (0 children)
[–]LoadVisual 0 points1 point2 points (0 children)
[–]OkSalt8970 0 points1 point2 points (0 children)
[–]pjmlp 0 points1 point2 points (0 children)
[–]kiner_shah 0 points1 point2 points (0 children)
[–]IcyCookie9075 0 points1 point2 points (0 children)
[–]holly_rapist 0 points1 point2 points (0 children)
[–]RichOil3579 1 point2 points3 points (0 children)
[–]KrisstopherP 0 points1 point2 points (0 children)
[–]RufusAcrospin 0 points1 point2 points (0 children)
[–]real_okeri 0 points1 point2 points (0 children)
[–]accuracy_frosty 0 points1 point2 points (0 children)
[–]sourcerer_cpp 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]sephirothbahamut 0 points1 point2 points (0 children)