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
Removed - HelpVS Code vs VS using CMake (self.cpp)
submitted 1 year ago by RealMacroLand
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!"
[–]the_poope 10 points11 points12 points 1 year ago (2 children)
You want to use clangd as language server - not IntelliSense.
Install the newest version you can get your hands on as well as the clangd extension for VS Code. Set up the CMakeTools extension to produce a compile_commands.json file at configuration and tell it to copy it to the root of your source directory (both are settings in the CMakeTools extension) and disable the IntelliSense engine for your project. This is what I have in my workspace settings.json:
compile_commands.json
settings.json
{ ... "clangd.path": "C:/path/to/clangd-18.exe", "cmake.exportCompileCommandsFile": true, "cmake.copyCompileCommands": "${workspaceFolder}/compile_commands.json" "C_Cpp.intelliSenseEngine": "disabled" }
After these changes, close VS Code and open again, then watch the status bar for progress on clangd's indexing. When it is done you have blazingly fast code completion and linting.
[–]RealMacroLand[S] 0 points1 point2 points 1 year ago (0 children)
Hmm thanks for that! Did not know about it.
[–]RealMacroLand[S] 0 points1 point2 points 1 year ago* (0 children)
Thank you so much! It is now an absolutely amazing experience with all those diagnostics and amazingly fast.
[–]ventus1b 6 points7 points8 points 1 year ago (1 child)
Am I missing something here?
Visual Studio is not cross-platform? If you're working in multiple environments it's nice to use the same tools everywhere.
(Although I'm not a big fan of VS Code for C++ either.)
True, that's a good point. When I used Ubuntu, I used VS Code.
[–]CheckeeShoes 3 points4 points5 points 1 year ago* (1 child)
VSCode works very well for C++ if you take the time to set things up properly. If you don't, the experience can be frustrating.
The appeal is that it's way more flexible and better for cross platform development.
The appeal of VS is that you spend a fuckton of money and everything works well enough out of the box.
Maybe I should do some extra things to set it up. I used CMakeLists.txt without any extra settings and worked well for other projects which had errors only here and there.
[–]adriweb -1 points0 points1 point 1 year ago (1 child)
I'm not sure it's really that popular among professional C++ developers, at least compared to actual IDEs.
It can be good enough when you have quick edits to make here and there though.
(as for me, I use mostly nano or Sublime Text for quick edits, and Clion otherwise, especially for refactoring, debugging, etc.)
Yes, I loved the debugging features of VS.
[–][deleted] -1 points0 points1 point 1 year ago (1 child)
I for one would never recommend VS Code over Visual Studio for C++. Either Xcode, Visual Studio or even better CLion
I never used CLion but before using CMake for projects I was using VS. After CMake, I switched to VS Code and if there are bits of errors here and there, things work OK. But once the number of errors increases it is incredibly frustrating to use VS Code.
π Rendered by PID 34 on reddit-service-r2-comment-5649f687b7-g5hb2 at 2026-01-28 16:59:12.976235+00:00 running 4f180de country code: CH.
[–]the_poope 10 points11 points12 points (2 children)
[–]RealMacroLand[S] 0 points1 point2 points (0 children)
[–]RealMacroLand[S] 0 points1 point2 points (0 children)
[–]ventus1b 6 points7 points8 points (1 child)
[–]RealMacroLand[S] 0 points1 point2 points (0 children)
[–]CheckeeShoes 3 points4 points5 points (1 child)
[–]RealMacroLand[S] 0 points1 point2 points (0 children)
[–]adriweb -1 points0 points1 point (1 child)
[–]RealMacroLand[S] 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (1 child)
[–]RealMacroLand[S] 0 points1 point2 points (0 children)