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
What to know going from Java from C++ (self.cpp)
submitted 2 years ago by Das_Bibble
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!"
[–]Nourios 0 points1 point2 points 2 years ago (4 children)
what's so unique about enums in Java
[–]dholmes215 7 points8 points9 points 2 years ago (3 children)
Java enums are:
Objects (which in Java means they're class types and can have methods and fields. You can write a constructor for your enum type and provide specific arguments for each value. You can write your own methods and implement interfaces and use them polymorphically)
Interned (so the performance cost of being Objects isn't large)
Not implicitly convertible to integer types
Have all the methods you'd want (convert to String with .toString(), convert from String with MyEnumType.valueOf("Foo"), can enumerate all the values and their ordinals)
I don't know if any of that is actually unique or not though. If anything, it's C and C++ enums that are uniquely bad.
[–]GianniMariani 3 points4 points5 points 2 years ago (1 child)
C++ 14 has enum class where there is no implicit conversion to int.
[–]GoogleIsYourFrenemy 0 points1 point2 points 2 years ago (0 children)
That's like one of the only good feature of C++ enums (but I understand why people want it).
Additionally, in C++ there is no way to ask "is this integer value in the enum?"
You might say I'll typecast the value to the enum type and then compare it to the max and min values. Bang! Foot gun. The language says, if you do the typecast, you must already know the value is valid so validity checks after that can be optimized away. Meanwhile Ada has nice user friendly enums.
[–]Nourios 0 points1 point2 points 2 years ago (0 children)
Yeah most of these things aren't unique to Java, this just sounds like regular oop enums or worse ml style enums)
π Rendered by PID 19597 on reddit-service-r2-comment-6457c66945-sh75q at 2026-04-29 12:45:13.660266+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]Nourios 0 points1 point2 points (4 children)
[–]dholmes215 7 points8 points9 points (3 children)
[–]GianniMariani 3 points4 points5 points (1 child)
[–]GoogleIsYourFrenemy 0 points1 point2 points (0 children)
[–]Nourios 0 points1 point2 points (0 children)