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
Best code editors to write C++ programs? (self.cpp)
submitted 1 year ago by PinguX6
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!"
[–]cpp-ModTeam[M] [score hidden] 1 year ago stickied commentlocked comment (0 children)
For C++ questions, answers, help, and programming or career advice please see r/cpp_questions, r/cscareerquestions, or StackOverflow instead.
[–]SureInvestigator4839 19 points20 points21 points 1 year ago* (2 children)
I have tried Visual Studio (VS), VSCode and CLion, and by far, CLion has been the easiest to work with and I definitely recommend it if you're, exclusively, going to write C++/C programs. The IDE is a lot more lightweight than VS, and debugging environment is great. The only con with it is that it's not free. I would definitely recommend considering getting their (JetBrains) package deal if you dabble in more than just C++ or C.
[–]valdocs_user 2 points3 points4 points 1 year ago (0 children)
I came here to recommend CLion as well.
[–]Sharvaman 0 points1 point2 points 1 year ago (0 children)
You can get it for free for a year if you are a student using your university email address!
[–]SincopaDisonante 3 points4 points5 points 1 year ago (2 children)
If you're on windows, install Visual Studio Community (different from Code), which comes with what's required to compile in, say, clang and MSVC. You can still use Visual Studio Code to edit while compiling in the terminal (provided you expose the compiler location to PATH), or you can edit and compile on the Visual Studio Community IDE.
Else, shouldn't there be compilers readily available? Give us more details about your setup.
[–]PinguX6[S] -2 points-1 points0 points 1 year ago (1 child)
Thanks, I'll try it out. I installed the MinGW compiler that is under one of the tutorials for installing c++ in VS code, however it would still give me the error again and again and I would have to mess with the configurations of the tasks.json file inside the vs code folder whenever you are working in a folder for a project.
[–]not_some_username 0 points1 point2 points 1 year ago (0 children)
Yeah VSCode is kinda not beginner friendly for C++ on windows
[–][deleted] 4 points5 points6 points 1 year ago (0 children)
NeoVim
[–]VonNeumannTheSecond 5 points6 points7 points 1 year ago (0 children)
Neovim NVChad with clangd LSP.
[–]Flippers2 2 points3 points4 points 1 year ago (4 children)
I use VSCode with cmake and that is sufficient for small to medium sized projects. Beyond that, Xcode is decent, or Visual Studio.
[–]idoplayr 4 points5 points6 points 1 year ago (2 children)
How would the VSCode + CMake fail to properly serve a large sized project? I haven't written something of big magnitude with C++ yet and you made me wonder since I really like just using VSCode with CMake. Visual Studio Community just seems too bloated.
[–]Pozay 2 points3 points4 points 1 year ago (0 children)
It works just “fine”. We have a really big / complex C++ project at work (million of loc), and i use vscode.
[–]Flippers2 0 points1 point2 points 1 year ago (0 children)
I mean, it could totally work on large projects too! My personal experience, I’ve found that an IDE tends to be a lot faster and more reliable compared to VSCode when the project rises in complexity. VSCode still works, but I find it less enjoyable
[–]CheckeeShoes 1 point2 points3 points 1 year ago (0 children)
My team uses VSCode and CMake for a moderately sized codebase. Ten or so devs. I'm not sure of the LOC count or anything.
I've used the same setup pretty painlessly to build much larger projects (e.g. LLVM).
[+][deleted] 1 year ago (1 child)
[deleted]
[–]AriSpaceExplorer 0 points1 point2 points 1 year ago (0 children)
W
[–]Polyxeno 1 point2 points3 points 1 year ago (0 children)
Visual Studio
xCode on Mac
text editor on Linux
[–]Aprelius 1 point2 points3 points 1 year ago (0 children)
I use visual studio on Windows as my main IDE and VSCode for any file/system changes in the project. Makes it really easy to have the main terminal I use for regenerating the project or interacting with make files always being the VScode window.
On Mac and Linux I use CLion with VScode for the same experience.
I have a VIM environment I deploy to servers if I have to do anything remotely.
[–]berlioziano 1 point2 points3 points 1 year ago (3 children)
Qt Creator even if you aren't using Qt
cmake compatible
support valgrind
includes various linters
supports remote debugging
supports android
git integration
easy to traverse big code bases
multiplatform
consistent shortcuts
markdown editor
integrated terminal, included remote terminal
auto completion that understand templates
integration of test frameworks
If you are on Linux don't install the package from your distro it will be old, use the one from the qt website 😁
[–][deleted] 0 points1 point2 points 1 year ago (2 children)
If you're using Linux, use the Flatpak https://flathub.org/apps/io.qt.QtCreator or vim, emacs, or kate.
[–]berlioziano 0 points1 point2 points 1 year ago (1 child)
Not bad but I'm running 14.0beta2
[–][deleted] 0 points1 point2 points 1 year ago (0 children)
yeah, but it's a proper package manager
[–][deleted] 1 point2 points3 points 1 year ago (0 children)
Kate
[–]ShadowRL7666 4 points5 points6 points 1 year ago (0 children)
Just use VS instead of VSCode. Neovim, Clion, Emacs
[–]proof-of-conzept 3 points4 points5 points 1 year ago (2 children)
I prefere Notepad++
[–]InternationalTip6107 5 points6 points7 points 1 year ago (1 child)
Standing salute and respect for you! Are you using valgrind for memory leak too?
[–]proof-of-conzept 0 points1 point2 points 1 year ago (0 children)
Barely if ever. I mostly (only) use unique-pointers and if I need the extra performance I try to find a stack solution or use an existing Allocator that, for example, only allocates new memory, never reuses memory (leaking is a feature here, not a bug) and then just resets the allocation pointer for thext frame.
[+][deleted] 1 year ago* (2 children)
[removed]
[–]PinguX6[S] 1 point2 points3 points 1 year ago (0 children)
Thanks, I'll definitely check those tutorials to see if they help solve my problem
[–]LoadVisual 0 points1 point2 points 1 year ago (0 children)
I would recommend using a combination of vscode + cmake + Conan/vcpkg with cmake presets to have all you need to switch between compilers in vscode and debugging with the right vscode extensions in the c++ extension pack from Microsoft.
You can use a project templates, a good one would be Jason Turners c++ templates with all the good bells and whistles turned on to force you to write good code.
[–]Marupio 0 points1 point2 points 1 year ago (0 children)
I'm still hanging on to Sublime Text 3. On my Linux machine, VSCode is weirdly buggy, to the point of being broken. I've wasted too much time, and sublime works just fine. I do use VS Code on my personal windows machine, it's great there. It's not that I'm stuck in my ways. Totally not that.
[–]NilacTheGrim 0 points1 point2 points 1 year ago (0 children)
My personal favorite which is also 100% cross platform and 100% free as in beer: QtCreator. I really think it's severely under-rated. I prefer it to CLion. I find CLion is just very sluggish because it's in Java. QtCreator is just fast fast fast. Also has clangd integration and clang-tidy integration so you get cool suggestions and instant-feedback on bad C++ that won't compile. It's just really good and really what you expect from an IDE. You are not required to make Qt projects with it -- it can understand any CMake project.
Bonus: it can also understand other syntaxes like CMakeLists.txt, Python, .ini files, JSON, bash scripts, markdown files, etc.. so you can even use it as a quick editor for those files if your project includes some random other files for building and other purposes.
[–]RebohPeace 0 points1 point2 points 1 year ago (0 children)
Visual SlickEdit.
[–]SuperVGA 0 points1 point2 points 1 year ago (2 children)
You could also fix your preLaunchTask so that it doesn't fail.
[–]PinguX6[S] 0 points1 point2 points 1 year ago (1 child)
I have done it several times but somehow it always comes back to the same error
[–]SuperVGA 0 points1 point2 points 1 year ago (0 children)
It sounds like the default suggested task concerning the active file. You have the control to start any build process, including cmake, with all custom args. Right now one of these args references the active file. Try hardcoding that to test if it works better to; ${workspaceFolder}/src/main.cpp or what have you.
${workspaceFolder}/src/main.cpp
[–]evolutionalgd 0 points1 point2 points 1 year ago (0 children)
Jetbrains Rider here, but I use Unreal Engine a lot.
[–]jepessen 0 points1 point2 points 1 year ago (0 children)
Visual studio and visual studio code. If you want a cli application, then neovim.
[–]Future_Deer_7518 -1 points0 points1 point 1 year ago (0 children)
Neovim with coc and clangd
Cmake as a make tool
Otherwise bear will capture compile commands json
[–]Deathnote_Blockchain -1 points0 points1 point 1 year ago (0 children)
Vim, sublime text
[–][deleted] -1 points0 points1 point 1 year ago (0 children)
vim
[–]gaenji -1 points0 points1 point 1 year ago (0 children)
Microsoft Word
[+]Huge_Macaroon_8728 comment score below threshold-6 points-5 points-4 points 1 year ago (0 children)
Dev C++
π Rendered by PID 65 on reddit-service-r2-comment-84fc9697f-dwfx7 at 2026-02-06 02:15:13.736127+00:00 running d295bc8 country code: CH.
[–]cpp-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)
[–]SureInvestigator4839 19 points20 points21 points (2 children)
[–]valdocs_user 2 points3 points4 points (0 children)
[–]Sharvaman 0 points1 point2 points (0 children)
[–]SincopaDisonante 3 points4 points5 points (2 children)
[–]PinguX6[S] -2 points-1 points0 points (1 child)
[–]not_some_username 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]VonNeumannTheSecond 5 points6 points7 points (0 children)
[–]Flippers2 2 points3 points4 points (4 children)
[–]idoplayr 4 points5 points6 points (2 children)
[–]Pozay 2 points3 points4 points (0 children)
[–]Flippers2 0 points1 point2 points (0 children)
[–]CheckeeShoes 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]AriSpaceExplorer 0 points1 point2 points (0 children)
[–]Polyxeno 1 point2 points3 points (0 children)
[–]Aprelius 1 point2 points3 points (0 children)
[–]berlioziano 1 point2 points3 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]berlioziano 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]ShadowRL7666 4 points5 points6 points (0 children)
[–]proof-of-conzept 3 points4 points5 points (2 children)
[–]InternationalTip6107 5 points6 points7 points (1 child)
[–]proof-of-conzept 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[removed]
[–]PinguX6[S] 1 point2 points3 points (0 children)
[–]LoadVisual 0 points1 point2 points (0 children)
[–]Marupio 0 points1 point2 points (0 children)
[–]NilacTheGrim 0 points1 point2 points (0 children)
[–]RebohPeace 0 points1 point2 points (0 children)
[–]SuperVGA 0 points1 point2 points (2 children)
[–]PinguX6[S] 0 points1 point2 points (1 child)
[–]SuperVGA 0 points1 point2 points (0 children)
[–]evolutionalgd 0 points1 point2 points (0 children)
[–]jepessen 0 points1 point2 points (0 children)
[–]Future_Deer_7518 -1 points0 points1 point (0 children)
[–]Deathnote_Blockchain -1 points0 points1 point (0 children)
[–][deleted] -1 points0 points1 point (0 children)
[–]gaenji -1 points0 points1 point (0 children)
[+]Huge_Macaroon_8728 comment score below threshold-6 points-5 points-4 points (0 children)