Jump to content

need help with translate c++ into java

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
Guest_Nolla_*

Guest_Nolla_*
  • Guests
i need some help tranleting my c++ program into a java program.

Attached Files



#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
That shouldn't be too hard since Java is similar to C++. You can try changing the name of the C++ file to .java and compiling with javac. Fix all of the errors you find.

#3
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
It'll be a little more complicated. The #includes need to change, the main function needs to be changed to the main class. The logic and class structures shouldn't change much, as long as there's no overloading.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#4
Lawtonfogle

Lawtonfogle

    Newbie

  • Members
  • Pip
  • 8 posts

Jordan said:

That shouldn't be too hard since Java is similar to C++. You can try changing the name of the C++ file to .java and compiling with javac. Fix all of the errors you find.

You do make it sound easy, but I am sure that even this will take some time.

#5
v0id

v0id

    Retired

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,936 posts

Jordan said:

That shouldn't be too hard since Java is similar to C++. You can try changing the name of the C++ file to .java and compiling with javac. Fix all of the errors you find.
I would prefer to code it from the scratch again. It shouldn't be so hard to do, it's pretty basic stuff. I'm not by myself Java programmer, but maybe here's someone?