Hi guys, we decided to create a on-line judging system, the user submits a piece of code and our system compiles it and run it with some test data and the results will be returned to let the user know. we think of using two thread to do this. the main thread supervises the sub-thread and the sub-thread is the user code. but the question is how to convey the test date through the main thread to the sub-thread? the user's code will be compiled into some DOS application, and it receives the test code through functions like "scanf" or "cin".
a sample of the system can be found at http://acm.pku.edu.cn/JudgeOnline/