Is it possible to have some sort of variable filled with code and then execute that variable?
For example:
(pseudo code)
Maybe a better example would be the SQL language where you can build the SQL sentences and then execute them.Code:executablevariable ev;
ev="if(i=1";
string.append(ev," && j=1");
string.append(ev," && k=1);");
//now we execute the "variable"
execute(ev);
//and this line is executed:
// if(i=1 && j=1 && k=1);
Is something like this possible in C++?