UNB/ CS/ David Bremner/ teaching/ cs2999/ run

Compiling and Running your program

In all cases, your code should be located in a single file. Do not put classes or functions in separate files, you can only submit a single file for judging.

Java

Compile:

javac filename

Run:

java classname < inputfile

(classname is the name of the class that your main method resides within)

C

Compile:

gcc filename

Run:

./a.out < inputfile

a.out is generated by gcc when you use the default settings. Use e.g. gcc -o foo foo.c to change this.

C++:

Compile:

g++ filename

Run:

./a.out < inputfile