Latest News

 










Strategy Example (3/4)

Previous slide Next slide Back to first slide View graphic version


Strategy Example (3/4)


 
My other sites

Latest News

 










Strategy Example (3/4)

    public class CppCompilation extends Compilation {


    public String getCompilationCommand(String program) {

    String cmd;

    String prop;

    prop = System.getProperty("os.name");

    String NTcppCompiler = "c:\\gnu\\bin\\g++.exe";

    String UNIXcppCompiler = "/usr/bin/gnu/gcc";

    if (prop.equals("Windows NT")) {

    cmd = new String(NTcppCompiler + " " + program);

    } else {

    //Presumes UNIX

    cmd = new String(UNIXcppCompiler + " -o " + program);

    }

    return cmd;

    }

    }

Previous slide Next slide Back to first slide View graphic version