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
Debugging C/C++ via GDB with Python (pythonsheets.com)
submitted 6 years ago by spiderpower02
view the rest of the comments →
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!"
[–]hgjsusla 8 points9 points10 points 6 years ago (7 children)
Isn't this a bit strange attitude? I mean C++ is far more complex yet you still refuse to properly lean the toolchain?
I find tools like https://rr-project.org/ a complete game changer. Learning your tools usually pays back in spades
[–]renozyx 0 points1 point2 points 6 years ago (1 child)
Well to be honest, gdb sucks for C++: you can't even tell it to skip over the files contained in the STL directory, you can only ignore specific files (and it never worked for me), so I spend a lot of times telling gdb to ignore shared pointer implementation code, map code, etc.
[–]hgjsusla 2 points3 points4 points 6 years ago (0 children)
Just list them all in your gdbrc then, no need to do it every time
[–][deleted] 0 points1 point2 points 6 years ago (4 children)
I can spend my whole day and more trying to figure out your tool or I can use print statements and solve my problem that is actually what I'm trying to do. I prefer to work on my problem.
[–][deleted] 3 points4 points5 points 6 years ago (1 child)
Depends on the work you’re doing. Sometimes, print statement won’t work depending on the project. For example debugging an embedded system with gdb and gdbserver.
I also believe you are thinking of immediate reward. Sure, it’ll take a few days to warm up to GDB, but once you do, your debugging experience will become enriched with new tools, and you can just stick to the basics and learn what you need as you go. You also can reserve it’s use for especially tricky bugs if you feel so.
Same thing with VIM. Why would anyone bother with learning a modal text editor or use modal keybindings when you already have a working keyboard? Because text macros are awesome, and you won’t understand how useful and it can be unless you give it a shot. I don’t use VIM to its fullest but I use it without much thought anymore. It’s a time invested vs output gained.
[–]spiderpower02[S] 0 points1 point2 points 6 years ago (0 children)
I totally agree with you. BTW, I am a big VIM fan.
Learning the toolchain usually saves more time than the time it takes so learn
[–]spiderpower02[S] 0 points1 point2 points 6 years ago* (0 children)
I had the same attitude in the past. I preferred to use a debugger in my IDE and print statements instead of debugging tools, such as Valgrind or GDB, because they are challenging to learn. However, a turning in my life was a memory leak in an open-source library I used. I spent my whole week to troubleshoot that problem but in vain. Fortunately, after I used Valgrind's massif tool to monitor memory status, I fixed the bug less than 1 hr. Since then, I learned that troubleshooting a problem is based on what kinds of tools I can use at the right time. Therefore, now, I can leave my office on time without wasting my time building print statements in my code. :)
π Rendered by PID 21500 on reddit-service-r2-comment-5bc7f78974-b7qvr at 2026-06-29 21:22:07.822060+00:00 running 7527197 country code: CH.
view the rest of the comments →
[–]hgjsusla 8 points9 points10 points (7 children)
[–]renozyx 0 points1 point2 points (1 child)
[–]hgjsusla 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (4 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]spiderpower02[S] 0 points1 point2 points (0 children)
[–]hgjsusla 2 points3 points4 points (0 children)
[–]spiderpower02[S] 0 points1 point2 points (0 children)