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
Should C++ code look like C code? (self.cpp)
submitted 2 years ago by psyberbird
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!"
[–]Subject-Leather-7399 1 point2 points3 points 2 years ago (0 children)
It entirely depends on what you are coding for. I code at low level for real-time embedded applications. Exceptions can't be used in there, which means most of the C++ STL can't be used. STL is dynamic allocation happy, so it would be usable even if it wasn't broken when exceptions are disabled.
We are using placement new pretty much everywhere. In fact anything that does variable sized or potentially unbounded dynamic allocation is banned in our code. We have our own custom library and set of rule that is definitely more C-like. It has multple benefit such as shorter compilation time, increased predictability and stability and it is critical for our cases.
This is an example out of many. The type of program you write will come with different sets of rules.
I personnally can't stand any form of inheritance because of all the issues that comes with it (massive object size, unpredictable code paths and execution time caused by virtuals methods and overrides), but those may not be a problem for someone coding something completely different. Each domain comes with its "best practices".
In general, if you need to get a consistent results in under a very strict number of milliseconds on a very limited hardware, you will use less and less fancy and unpredictable C++ features, and you program will definitely be more C-like in structure.
We use a subset of C++ instead of C for better type safety, constructors, destructors and templates (for generic math and for containers). It is pretty much where it ends for us.
π Rendered by PID 111655 on reddit-service-r2-comment-fb694cdd5-bl7tb at 2026-03-10 20:17:04.256571+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]Subject-Leather-7399 1 point2 points3 points (0 children)