rem from www.microchipc.com/mingw_tutorial/
rem Make file for UltraEdit
rem Companion file for UVa online judge, at:
rem First parameter %1 is path, eg: C:\Test\
rem Second parameter %2 is filename, eg: filename
rem Third parameter %3 is extension (including dot), eg: .c
rem Compile the program
rem You will have to install mingw from www.mingw.com.
c:\mingw\bin\g++ %1%2%3 -o %1%2.exe
rem Run the executed program - but only if it compiled.
if ERRORLEVEL 1 GOTO END
rem You can see that the input to the compiled program
rem comes from a file with an extension .txt rather than .c
Load up both files into UltraEdit. As you can see, 11172 contains sample input that will be sent into the program via the "cin" statements.
Switch to 11172.c, then select "Advanced..Compile and Run". Next:
(a) The program is compiled to "11172.exe".
(b) The program is executed.
(c) "11172.exe" receives input from "11172.txt" via the "cin" statements.
(c) The output from "11172.exe" is piped back the base of the ultraedit screen.
You can now upload this program to http://online-judge.uva.es/, to see how it is judged. Find the program 11172, it is located under "Browse Problems :: Contest Volumes :: Volume CXI :: 11172 - Relational Operator".
Congratulations. You have uploaded your first program to http://online-judge.uva.es/. You can now hone your program skills by solving other problems. There is over 2,500 problems to complete, and you can see your ranking compared to 80,000 other programmers.