Results 1 to 3 of 3
  1. #1
    Anuroop is offline Member
    Join Date
    May 2013
    Posts
    1
    Rep Power
    0

    Default Conversion of C++ Code to Java --> #IfDef in Java

    #define DUMP 1
    #ifdef DUMP
    dump_ffa(t);
    #endif

    void dump_ffa(int gen)
    {
    cout << "Dump at gen= " << gen << " best= " << fbest << endl;
    }

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,655
    Blog Entries
    7
    Rep Power
    21

    Default Re: Conversion of C++ Code to Java --> #IfDef in Java

    Java doesn't use a preprocessor, so there is non one-to-one mapping between that code snippet and Java. Java also doesn't use operator overloading so you have to use System.out.print( ... );

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default Re: Conversion of C++ Code to Java --> #IfDef in Java

    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

Similar Threads

  1. Java API for RTF to DOCX Conversion
    By saravananiyyanar in forum Advanced Java
    Replies: 1
    Last Post: 01-15-2011, 11:56 PM
  2. Need help modifying code for hex conversion
    By gamer765 in forum New To Java
    Replies: 14
    Last Post: 10-25-2010, 06:59 AM
  3. tcl to java conversion
    By mark_wit in forum New To Java
    Replies: 2
    Last Post: 08-24-2009, 08:58 PM
  4. .java > .class conversion
    By Fate_Remai in forum New To Java
    Replies: 18
    Last Post: 07-31-2008, 02:12 AM
  5. IDL to Java conversion using idltojava
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-07-2007, 12:05 PM

Posting Permissions

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