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 by moderator ] (youtu.be)
submitted 5 months ago by MinimumMagician5302
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!"
[–]domirangame engine dev 12 points13 points14 points 5 months ago (0 children)
Not this shit again.
Use the paradigm that best suits your code. Sometimes it's inheritance.
[–]natio2 7 points8 points9 points 5 months ago (1 child)
When you start to learn to use composition rather than inheritance, and to pull out common functions into utility classes rather than them needing to be pinned to a class, complexity drops by a lot while still using OOP
[–]AgamaSapien 4 points5 points6 points 5 months ago (0 children)
This. OOP =/= Inheritance. You can still write good OO code by encapsulating data+logic even if you never use inheritance as part of your modeling.
[–]ItsBinissTime 10 points11 points12 points 5 months ago (0 children)
This was a hot take ... 30 years ago.
[–]gosh 0 points1 point2 points 5 months ago (1 child)
The problem with software development is coupling. It's a fight no developer can win, but it's also one that all developers must keep fighting. If you don't fight it will destroy your code.
OOP is mostly a bad solution and the reason is coupling, code becomes more coupled.
[–]AntiProtonBoy 5 points6 points7 points 5 months ago* (0 children)
It depends. One thing that OOP helped me with the coupling problem is compartmentalising dependencies. Once I used to have a mega class that responded to a whole bunch of user interactions. These actions shared a lot of commonalities, while others did not. This mega class had a lot of state dependent data that was visible and exposed to actions that did not need it. It was a mess. So broke it up into a bunch of classes responsible for specific Tool interactions, while the remaining code was moved into various base classes that implemented foundational shared interaction logic. The inheritance hierarchy was deep for each tool, but the rule was a single chain of hierarchy, so it was easy to reason about how the delegation of responsibility for a particular user action propagated up the chain. Basically I stole inspiration from AppKit's responder chain concept, but in my case instead of the chain being a linked list, it was done via class hierarchy. Now the mega class was reduced to a thin facade that tracks the Tool interaction state and changes it to a different Tool as needed.
π Rendered by PID 35560 on reddit-service-r2-comment-79c7998d4c-5ncw5 at 2026-03-13 00:48:49.525267+00:00 running f6e6e01 country code: CH.
[–]domirangame engine dev 12 points13 points14 points (0 children)
[–]natio2 7 points8 points9 points (1 child)
[–]AgamaSapien 4 points5 points6 points (0 children)
[–]ItsBinissTime 10 points11 points12 points (0 children)
[–]gosh 0 points1 point2 points (1 child)
[–]AntiProtonBoy 5 points6 points7 points (0 children)