Grading Program - Compile/executing c++ code within c++
<p>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 new executables in processes and searches the output for certain strings. This also allows me to have a timeout on processes for programs that crash.</p>

<p>Is there a better way to do this than a system call? Or a better way to do this in general?</p>
