User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 423,460 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,816 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 1017 | Replies: 8
Reply
Join Date: Sep 2006
Posts: 7
Reputation: im4tion is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
im4tion im4tion is offline Offline
Newbie Poster

Java to C++

  #1  
Feb 18th, 2007
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++
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Posts: 4,782
Reputation: iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light 
Rep Power: 17
Solved Threads: 319
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Industrious Poster

Re: Java to C++

  #2  
Feb 18th, 2007
Originally Posted by im4tion View 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++


In short, no.
I'm not a programmer. My attitude starts with ignorance, holds steady at conversation, and ends with a trip to the hospital. Get used to it.
Reply With Quote  
Join Date: Feb 2007
Location: in front of computer..
Posts: 29
Reputation: Monyet is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Monyet's Avatar
Monyet Monyet is offline Offline
Light Poster

Re: Java to C++

  #3  
Feb 18th, 2007
lol... lazy bum, type it again!!!!
Reply With Quote  
Join Date: Nov 2005
Posts: 72
Reputation: Cudmore is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 5
Cudmore's Avatar
Cudmore Cudmore is offline Offline
Junior Poster in Training

Help Re: Java to C++

  #4  
Feb 18th, 2007
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.
synchronized (theWorld) { System.out.println ("It's all mine..."); }
How many people have code in their Sigs?
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 197
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Java to C++

  #5  
Feb 18th, 2007
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.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote  
Join Date: Sep 2006
Posts: 7
Reputation: im4tion is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
im4tion im4tion is offline Offline
Newbie Poster

Re: Java to C++

  #6  
Feb 19th, 2007
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 =_=
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 197
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Java to C++

  #7  
Feb 19th, 2007
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.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote  
Join Date: Sep 2006
Posts: 7
Reputation: im4tion is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
im4tion im4tion is offline Offline
Newbie Poster

Re: Java to C++

  #8  
Feb 19th, 2007
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.
Reply With Quote  
Join Date: May 2006
Location: Bellevue, WA
Posts: 1,548
Reputation: Infarction has a spectacular aura about Infarction has a spectacular aura about Infarction has a spectacular aura about 
Rep Power: 8
Solved Threads: 51
Sponsor
Infarction's Avatar
Infarction Infarction is offline Offline
Battle Programmer

Re: Java to C++

  #9  
Feb 20th, 2007
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...
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Java Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Java Forum

All times are GMT -4. The time now is 3:02 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC