Thread: Translating Program Languages

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    30

    Translating Program Languages

    Hello, Everyone:

    I have some program in C language and others in Java programming which I would like to translate into C++. I am very interested in where I can find a website and download a software, i.e., so I can translate from C to C++ and from Java to C++.

    Anyone with suggestions, I will greatly appreciate your help.
    Thanks

  2. #2
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    You won't find a program to do this for you.

    You really have to know both languages to "port" from one language to another. (Although I did port a really-really short Pascal program to C++ once.. and I don't know Pascal!)

    You can generally re-compile a C program on a C++ compiler, as C is (mostly) a subset of C++. However, almost all real-world programs contain some compiler-specific code. This means that there is usually some "work" required.

    P.S.
    It's usually easier to start-over and re-write the program from scratch in your preferred language than to try and "translate" the program. The exception might be games, where the program's behavior is obscured and randomized, and there are graphics that would be difficult to re-create.
    Last edited by DougDbug; 11-22-2005 at 01:20 PM.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660

  4. #4
    Registered User
    Join Date
    Oct 2005
    Posts
    30
    Hello, Salem:

    Thank you for clarifying my suspicions. However, when I went to the website you told me, I get stuck where to
    http://www.programics.com/java2cpp.php
    in the downloads... I am not sure where to click on and install the program. Can you give some pointers?

    Thank you in advance!

  5. #5
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    http://www.programics.com/downloads.php

    ...if you get lost in that page, don't forget to reply.
    Sent from my iPadŽ

  6. #6
    Registered User
    Join Date
    Oct 2005
    Posts
    30
    Hello, SlyMaelstrom

    I am not sure which of these should I use to download the translation...

    SimpleSQL for Java simplesql1.2.3_java.zip Java
    SimpleSQL JDBC driver, server, SQLConsole, SQLShell, documentation

    SimpleSQL C++ for Windows simplesql1.02.02_win32.zip Windows
    SimpleSQL interfaces for C++, C, PHP, OLE (COM, ActiveX), server,SQLConsole, SQLShell, documentation

  7. #7
    Registered User
    Join Date
    Oct 2005
    Posts
    30
    Hello once again, SlyMaelstrom:

    I choose the second one about C++ for Windows. I downloaded the files but I am getting a bunch of icons which I am really unfamiliar with. What should be my following step?

  8. #8
    Registered User
    Join Date
    Mar 2005
    Posts
    140
    SimpleSQL ????

    look down further for
    DFC + java2cpp

    though I have no idea how to use it from there

  9. #9
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    In the download zip there is a ton of documentation. I'd get to readin' if you want to use it.
    Sent from my iPadŽ

  10. #10
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    I stand corrected! And I'll be truly amazed if this really works!

  11. #11
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    It should work. I would think it works just as a C++ compiler can essentially convert from C++ to assembly language.

    Though I don't know how much about how that works.
    Sent from my iPadŽ

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  2. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 11:17 PM
  3. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM