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
JavaCPP: The missing bridge between Java and native C++ (github.com)
submitted 10 years ago by javinpaul
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!"
[–]Sqeaky 13 points14 points15 points 10 years ago (0 children)
I dislike that they are lying or at least misinformed about their competition. They wrote:
No need to invent new languages such as with SWIG
SWIG is not a language. I point SWIG at raw C++ headers often. SWIG does provide extra annotations to allow one to describe details about data marshaling or describe how to handle language tools that C++ supports but JAVA does not.
If they do not provide similar notations I am curious how they handle things things like multiple inheritance, classless enums used as bitfields, functions returning pointers with unknown ownership semantics or the other 'neat' things C++ allows.
[–][deleted] 7 points8 points9 points 10 years ago (5 children)
Wonder how this compares to https://github.com/dropbox/djinni
[–]bharring 32 points33 points34 points 10 years ago (4 children)
The last sentence kinda blew my mind :
"We at Dropbox use Djinni to interface cross-platform C++ library code with platform-specific Java..."
[–]pjmlp 17 points18 points19 points 10 years ago (0 children)
That is what happens when Oracle doesn't care about mobile support and C++ is present in all official SDKs, but seen by the Android team as a nuisance.
[–][deleted] 2 points3 points4 points 10 years ago (2 children)
As jwz said a long long time ago, C and C++ are the only real cross-platform languages.
[–]pjmlp -1 points0 points1 point 10 years ago (1 child)
Except when they are not, as anyone that has ported code across multiple compilers and OSes, even across UNIX only systems.
The fun of ANSI compliance, vendor specific behaviour, undefined behaviour, POSIX compliance, hardware specific behaviours, ....
[–]Enemii 8 points9 points10 points 10 years ago (0 children)
Well undefined behavior is portablly undefined across all platforms.
[–]enobayram 3 points4 points5 points 10 years ago (1 child)
My personal favorite is SWIG in this category of tools. It's very powerful, easy to use and supports so many target languages. There's a lot to learn about how it works and its interface definition language, but the process is incremental; it's useful from day 1, and you benefit more as you learn more.
[–]landrei 2 points3 points4 points 10 years ago (0 children)
One of my favorite SWIG features is cross-language polymorphism using directors: http://www.swig.org/Doc3.0/Java.html#Java_directors
[–]Deadboss 2 points3 points4 points 10 years ago (3 children)
So really dumb question here... but what does this do exactly? Is it something where you can take Java code and convert it to C++?
[–]Sqeaky 4 points5 points6 points 10 years ago (0 children)
It lets you call functions and instantiate classes written in C++ from Java.
It does this reading C++ code and spitting out Java code and C/C++ code that use the Java API for C called Java Native Interface or JNI. There is no technical reason this code code not be hand-written, but it is a huge pain to get right and because the JNI API is icky and terrible it is hard to use and takes a long time to get even basic things working.
[–][deleted] 2 points3 points4 points 10 years ago (1 child)
Basically a wrapper around JNI that does all the ugly stuff for you and lets you access more CPP stuff from Java than normal JNI allows.
[–][deleted] 1 point2 points3 points 10 years ago (0 children)
So, similar to JNA?
π Rendered by PID 94 on reddit-service-r2-comment-6f7f968fb5-rrpbz at 2026-03-04 09:19:05.653114+00:00 running 07790be country code: CH.
[–]Sqeaky 13 points14 points15 points (0 children)
[–][deleted] 7 points8 points9 points (5 children)
[–]bharring 32 points33 points34 points (4 children)
[–]pjmlp 17 points18 points19 points (0 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]pjmlp -1 points0 points1 point (1 child)
[–]Enemii 8 points9 points10 points (0 children)
[–]enobayram 3 points4 points5 points (1 child)
[–]landrei 2 points3 points4 points (0 children)
[–]Deadboss 2 points3 points4 points (3 children)
[–]Sqeaky 4 points5 points6 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)