Page 2 of 2 FirstFirst 12
Results 21 to 32 of 32

Thread: Java to C++

  1. #21
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default

    Quote Originally Posted by lolu View Post
    @Tolls: How 'right' is C/C++ if Java is supposed to do things better? Wldnt that make Java the 'best tool for the job'?
    Java's not terribly good (in fact, read "quite poor by design") at interacting with the underlying hardware, except in the most simple of ways. C (either one) is much better at doing that since it runs on the hardware, and not in a virtual machine.

    As an example.

    I wouldn't write drivers in Java.

    (I wouldn't write drivers at all, in fact, but that's just me...:))

  2. #22
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,526
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Tolls View Post
    Java's not terribly good (in fact, read "quite poor by design") at interacting with the underlying hardware
    Java was explicitly designed to be platform neutral and doesn't even want to interact with the bare metal; other languages have to be used for that, but if you want to "write once, run everywhere" Java is a good choice.

    kind regards,

    Jos

  3. #23
    sky
    sky is offline Member
    Join Date
    Nov 2009
    Posts
    96
    Rep Power
    0

    Default

    Quote Originally Posted by lolu View Post
    Oh, I forgot to mention: The C Programming Language book i got is a 1988 print. Am I on track? Or do l need to look for a later version?
    It's very easy to find a .pdf version of the book on the Internet

  4. #24
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,526
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by sky View Post
    It's very easy to find a .pdf version of the book on the Internet
    I doubt that; some ten years ago an online version showed up and Dennis Ritchie personally took care that the entire site was taken off line; there were even lawyers involved.

    kind regards,

    Jos

  5. #25
    Singing Boyo is offline Senior Member
    Join Date
    Mar 2009
    Posts
    552
    Rep Power
    6

    Default

    About the DITDAH code... it looks like a C program written using simulated morse code (macros). All the DITs and DAHs actually have a meaning... my god that is weird code. *faint*
    If the above doesn't make sense to you, ignore it, but remember it - might be useful!
    And if you just randomly taught yourself to program, well... you're just like me!

  6. #26
    Addez is offline Senior Member
    Join Date
    Aug 2009
    Posts
    294
    Rep Power
    0

    Default

    I belive that you can import c++ packages (called foreign packages) into java, so that should be a plus XD

  7. #27
    Supamagier is offline Senior Member
    Join Date
    Aug 2008
    Posts
    384
    Rep Power
    7

    Default

    Yes you can
    I die a little on the inside...
    Every time I get shot.

  8. #28
    lolu is offline Member
    Join Date
    Nov 2009
    Location
    Abuja, Nigeria
    Posts
    15
    Rep Power
    0

    Default

    @Tolls & Josah: I guess I get the picture.

    Im yet to check what's written on the book but so far, it looks ok. Its actually a web page collection version.

  9. #29
    Valkyrie is offline Member
    Join Date
    Oct 2009
    Posts
    15
    Rep Power
    0

    Default

    Here's some syntax of C:

    Java Code:
    #inlcude <stdio.h>
    #include <stdlib.h>
    
    int main(void)
    {
    printf("Hello World\n");
    system("ECHO Hello Again");
    
    getchar();
    system("PAUSE");
    return 0;
    }
    If you want to learn more about the functions in C, Pelles C Content Help has a list of functions, keywords, etc. about that you can use to familiarize yourself in C.

  10. #30
    Join Date
    Nov 2009
    Posts
    26
    Rep Power
    0

    Default

    c++ to java was very easy for me. The vice versa i don't know...


    java being dynamic is correct. c++ is more of a lazier language. one thing i noticed about java is all the extra coding you have to do. And how there can't be all too much fuss in one class/object too.

    Ultimately, java to c++ should be super easy.... A lot faster to code, lol.
    Last edited by helpisontheway; 12-16-2009 at 02:28 AM.

  11. #31
    Valkyrie is offline Member
    Join Date
    Oct 2009
    Posts
    15
    Rep Power
    0

    Default

    Well, my advice is to start in C and then go to C++ because C++ was made from C so its syntax is similar to C. Also you can execute your Java programs using C or C++ as well.
    Last edited by Valkyrie; 12-15-2009 at 05:03 PM.

  12. #32
    raqman is offline Member
    Join Date
    Sep 2009
    Posts
    37
    Rep Power
    0

    Default

    Hi.
    In my opinion, you can refer to the url below:
    Moving from Java to C++
    Regards,
    raqman.
    RAQ Report: free Java reporting tool.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •