943,703 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1566
  • Java RSS
Feb 18th, 2007
0

Java to C++

Expand Post »
Hi. I have a bunch of Java codes I have done and I was wondering if there is a possible software or program to convert it into c++?

This is because I've done it in Java and now my lecturer wants it to be in c++
>< The concept is different and I have near-to-none experience in c++
Similar Threads
Reputation Points: 14
Solved Threads: 0
Newbie Poster
im4tion is offline Offline
7 posts
since Sep 2006
Feb 18th, 2007
0

Re: Java to C++

Click to Expand / Collapse  Quote originally posted by im4tion ...
Hi. I have a bunch of Java codes I have done and I was wondering if there is a possible software or program to convert it into c++?

This is because I've done it in Java and now my lecturer wants it to be in c++
>< The concept is different and I have near-to-none experience in c++
In short, no.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Feb 18th, 2007
-1

Re: Java to C++

lol... lazy bum, type it again!!!!
Reputation Points: 10
Solved Threads: 0
Light Poster
Monyet is offline Offline
29 posts
since Feb 2007
Feb 18th, 2007
0

Re: Java to C++

One reason for the "no" is that Java uses Java-specific resources.. Take the hundreds of importable classes, for example. Take swing, awt, net, etc, etc, and realize that all of these packages were written in Java and are available only to Java. Of course, almost anything you can do in Java, you can do in another language such as C++. However, the methodology and syntax is often different, especially when dealing with API calls, and data variables/structures/etc, pointers, keywords, and basically everything else. There are several minor language differences, and several major problem-solving differences. Basically, learn C++ and the APIs that go along with it, or write your program APIs from scratch following basic principals.. I'm sure another member can shed more light on the matter.
Reputation Points: 20
Solved Threads: 6
Junior Poster in Training
Cudmore is offline Offline
74 posts
since Nov 2005
Feb 18th, 2007
0

Re: Java to C++

There are programs that can translate from one language to another, but they're imperfect.

They also cannot translate from programming paradigms in one language to those in another, which leaves you with very weird looking code that's a dead giveaway as having been generated by such a tool.

Almost always it's better to start from scratch.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Feb 19th, 2007
0

Re: Java to C++

Aaah..Darn! I was hoping I could.
Then uh..could any of you guys gimme a hand on changing some java coding to c++ ?
That's the main part of the code transformation I'm currently facing =_=
Reputation Points: 14
Solved Threads: 0
Newbie Poster
im4tion is offline Offline
7 posts
since Sep 2006
Feb 19th, 2007
0

Re: Java to C++

no, we're not going to do your homework for you.
You should have ascertained the requirements before you started hacking. As you didn't, you now have to face the consequences.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Feb 20th, 2007
0

Re: Java to C++

Firstly, No I did not ask you to do my homework for me. I was just asking if you could help me convert a function (small part of coding) into c++. As I have stated in the first post, I'm a newb.
Second, I clearly didn't see where I am hacking.
So please read and try to understand before shooting at me.
Reputation Points: 14
Solved Threads: 0
Newbie Poster
im4tion is offline Offline
7 posts
since Sep 2006
Feb 20th, 2007
0

Re: Java to C++

Yes, we can give you a hand. You'll find many members reluctant to throw in an arm with that deal unless you put in just as much. That said, post some code and explain what you've tried and how it's not working and we'll see how it goes...
Reputation Points: 683
Solved Threads: 53
Posting Virtuoso
Infarction is offline Offline
1,580 posts
since May 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: help me please
Next Thread in Java Forum Timeline: Please help !





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC