Sign in to follow this  
NightMarez

Converting some c++ files to java files?

Recommended Posts

Hi there :) Im looking at some cryptation files for network in c++ that uses memory map and stuff, that i need convertet to java. however, its giving me alot of headacke, and i was wondering if anyone in here would be interrestet in lending me a hand converting them? its not alot of code, some of it is already convertet, but now im kinda stuck. the code is here (4 c++ files, 3 java files i been working on) : http://www.freeplay.dk/ls/ctoj.zip if you convert them, mail them to me please to : admin@freeplay.dk many thanks to ANY help you can give.

Share this post


Link to post
Share on other sites
You cannot convert C++ to Java. The featuresets are too different. In all of the cases I have seen where someone takes a .cpp file and tries to edit it into a .java file, they end up spending more time and ending up with a crappier result than if they rewrote using the same overall structure.

Share this post


Link to post
Share on other sites
hum okay, i got told you can, you just need to fix the variables like

unsigned long in c++ is long[] in java and so on.

and i did already rewrite alot of it, just the last parts giving me problems.

Share this post


Link to post
Share on other sites
Depending on what your exact needs are, you might also want to consider using the JNI (Java Native Interface). This allows you to call C/C++ code directly from Java.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this