Hey all!
I was thinking about how to make a program, in which you write some c++ code and program tests that code with given examples.
For example you input following code in that program:
#include <iostream>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
cout << a + b;
return 0;
}
the program compiles and tests the code (for example it tests if you input 1 and 3, will 4 be written in console using that code) and gives you information if the program is working or not.
Or in other words, how to make program that compiles given code (using compiler, for example g++) and tests it.
Thanks! :)