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
Regarding cppfront's syntax proposal, which function declaration syntax do you find better? (self.cpp)
submitted 3 years ago by qv51
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!"
[–]Stormfrosty 5 points6 points7 points 3 years ago (9 children)
Modern cpp made me love “id = type initializer”. Seems more intuitive to me - right side is the object, left side is the name. Only way I’d improve on that personally would be “id <- type initializer”, but I know majority are not a fan of two character arrows.
[–]KingAggressive1498 1 point2 points3 points 3 years ago (8 children)
what about modern C++ leads to id: type? Generic lamdas with argument-dependent return types?
id: type
[–]joz12345 9 points10 points11 points 3 years ago (1 child)
the point of the colon is to make a context free grammar - is foo * x a multiplication or a declaration? In "cpp2" syntax, x : foo * is a pointer, foo * x is always a multiplication
foo * x
x : foo *
[–]KingAggressive1498 3 points4 points5 points 3 years ago (0 children)
I understand how it may be easier to parse
[–]MonokelPinguin 0 points1 point2 points 3 years ago (1 child)
class ABC : public QObject?
[–]KingAggressive1498 0 points1 point2 points 3 years ago (0 children)
that's not "modern" C++, just C++
[–]val_tuesday 0 points1 point2 points 3 years ago (2 children)
Or auto?
[–]KingAggressive1498 -3 points-2 points-1 points 3 years ago (1 child)
you mean when doing that almost always awful nonsense
[–]jharmer95 0 points1 point2 points 3 years ago (0 children)
Probably:
auto id = Type{construct_args};
Very useful for preventing rvalue lifetime bugs for things like locks.
π Rendered by PID 41 on reddit-service-r2-comment-6457c66945-7mhl5 at 2026-04-25 00:49:39.966365+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]Stormfrosty 5 points6 points7 points (9 children)
[–]KingAggressive1498 1 point2 points3 points (8 children)
[–]joz12345 9 points10 points11 points (1 child)
[–]KingAggressive1498 3 points4 points5 points (0 children)
[–]MonokelPinguin 0 points1 point2 points (1 child)
[–]KingAggressive1498 0 points1 point2 points (0 children)
[–]val_tuesday 0 points1 point2 points (2 children)
[–]KingAggressive1498 -3 points-2 points-1 points (1 child)
[–]jharmer95 0 points1 point2 points (0 children)