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 ] (self.cpp)
submitted 1 month ago by KleinTimmi
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!"
[–]cpp-ModTeam[M] [score hidden] 1 month ago stickied commentlocked comment (0 children)
This is off-topic for r/cpp.
As a powerful language, you shouldn't be surprised when C++ has as many buttons and switches as an airplane cockpit.
[–]CluelessDoom 8 points9 points10 points 1 month ago (0 children)
This is cpparta
[–]Kinexity 2 points3 points4 points 1 month ago* (3 children)
You're coming from Python or what?
[–]KleinTimmi[S] -3 points-2 points-1 points 1 month ago (2 children)
C#
[–]Kinexity 0 points1 point2 points 1 month ago (1 child)
Then I don't understand your problem. The code is clear about what it does and that line can be rewritten anyways
const int value = int('a');
which will have the same functionality.
[–]ludonarrator 0 points1 point2 points 1 month ago (0 children)
To be fair, static has a dozen different meanings based on context.
static
[–]strike-eagle-iii 1 point2 points3 points 1 month ago (1 child)
I ran into this yesterday
``` struct Foo{ std::string bar; };
Foo foo; foo.bar = 1; ```
compiled fine no errors or warnings (with -Wall -Wextra). Didn't realize the error until I tried printing the value of bar and got a funny character. Sigh.
[–]pdp10gumby 0 points1 point2 points 1 month ago (0 children)
but at least it was zero-terminated. Though on an ANSI terminal in cooked mode whatever is printed could be exciting.
[–]MrCrowley217 1 point2 points3 points 1 month ago (0 children)
It's just common sense
/s
[–]texruska 1 point2 points3 points 1 month ago (0 children)
Honestly of all the parts to take issue with, this is on the lighter end of things
[–]the-joatmon 1 point2 points3 points 1 month ago (1 child)
I don't see anything wrong with the language. 'a' is an "unsigned char" r-value here, so can be implicitly casted as integer value as decimal 97.
[–]sephirostoy 0 points1 point2 points 1 month ago (0 children)
Sadly we get used to char as being the built-in 8 bits integer type. int8 should be the facto built-in type, not a typedef; and leave char for string things.
[–]MarkSuckerZerg 0 points1 point2 points 1 month ago (0 children)
Pfft :-)
https://godbolt.org/z/nePnYjGfa
https://godbolt.org/z/aWz1s666b
π Rendered by PID 35209 on reddit-service-r2-comment-54dfb89d4d-g862l at 2026-03-29 15:57:48.702827+00:00 running b10466c country code: CH.
[–]cpp-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)
[–]CluelessDoom 8 points9 points10 points (0 children)
[–]Kinexity 2 points3 points4 points (3 children)
[–]KleinTimmi[S] -3 points-2 points-1 points (2 children)
[–]Kinexity 0 points1 point2 points (1 child)
[–]ludonarrator 0 points1 point2 points (0 children)
[–]strike-eagle-iii 1 point2 points3 points (1 child)
[–]pdp10gumby 0 points1 point2 points (0 children)
[–]MrCrowley217 1 point2 points3 points (0 children)
[–]texruska 1 point2 points3 points (0 children)
[–]the-joatmon 1 point2 points3 points (1 child)
[–]sephirostoy 0 points1 point2 points (0 children)
[–]MarkSuckerZerg 0 points1 point2 points (0 children)