I am writing a program to grade C++ code that students submit. Right now it uses a system call to compile every source file then redirects the input to a file and calls the
You may want to run the programs under an alternate account, e.g. ssh with key-based authentication is a good way to switch to a dummy account.
If any of the assignments require user interaction, then expect (which is Tcl-based) would be a good choice.
expect