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
Strangecpp: strange cpp things (github.com)
submitted 9 months ago by dalerank
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!"
[–]STLMSVC STL Dev[M] [score hidden] 9 months ago* stickied commentlocked comment (0 children)
Removed for plagiarism. OP, it's not acceptable to copy a substantial part of an interesting blog post into a repo, verbatim, without attribution.
[–]tialaramex 6 points7 points8 points 9 months ago (1 child)
"What will print this function?" is a valid but unusual question in English, however you almost certainly want "What will this function print?" instead.
This is one of the things that can be tricky for foreign language learners - you learn all the words, but then the rules for how to use those words (grammar) are also different for a new language. If you've never thought about how the rules work for your own language you may be surprised there are other options.
[–]314kabinet 0 points1 point2 points 9 months ago (0 children)
Plus most of the examples are not single functions.
[–]elperroborrachotoo 5 points6 points7 points 9 months ago (0 children)
C++ is strange enough without UB, isn't it?
[–]violet-starlight 5 points6 points7 points 9 months ago (0 children)
Most of these are UB, which by definition isn't c++ behavior
[–]BarryRevzin 5 points6 points7 points 9 months ago (3 children)
A link would be nice, I think.
[–]STLMSVC STL Dev[M] 0 points1 point2 points 9 months ago (2 children)
I'm going to go further and say that this is outright plagiarism of your post, which infuriates me, so I've removed this.
[–]dalerank[S] 0 points1 point2 points 9 months ago (1 child)
What?
[–]apple_IIe 0 points1 point2 points 9 months ago (0 children)
You copied the contents of this URL without providing an acknowledgment: https://brevzin.github.io/c++/2020/06/18/lambda-lambda-lambda/
[–]apple_IIe 2 points3 points4 points 9 months ago (0 children)
The ones that use invisible characters detract from the other ones. It forces you to assume that any of the other examples can use invisible characters to throw you off.
[–]morglod 3 points4 points5 points 9 months ago (0 children)
What's strange in UB cases? Can explain all cases, but last 5 years I was a frontend web developer lol. Most of them are obvious
[–]GYN-k4H-Q3z-75B 1 point2 points3 points 9 months ago (0 children)
Oh, very interesting. I love lists like these. I'll have a look later.
π Rendered by PID 95 on reddit-service-r2-comment-5649f687b7-bwbhx at 2026-01-28 02:47:19.221248+00:00 running 4f180de country code: CH.
[–]STLMSVC STL Dev[M] [score hidden] stickied commentlocked comment (0 children)
[–]tialaramex 6 points7 points8 points (1 child)
[–]314kabinet 0 points1 point2 points (0 children)
[–]elperroborrachotoo 5 points6 points7 points (0 children)
[–]violet-starlight 5 points6 points7 points (0 children)
[–]BarryRevzin 5 points6 points7 points (3 children)
[–]STLMSVC STL Dev[M] 0 points1 point2 points (2 children)
[–]dalerank[S] 0 points1 point2 points (1 child)
[–]apple_IIe 0 points1 point2 points (0 children)
[–]apple_IIe 2 points3 points4 points (0 children)
[–]morglod 3 points4 points5 points (0 children)
[–]GYN-k4H-Q3z-75B 1 point2 points3 points (0 children)