Change string to function | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Change string to function

is there any code in c++ that execute string as function for example int main() { float b; string a="b=sin(90)*exp(2)*pow(2,5);"; exe(&a); cout《b; } I expect exe function that execute string a as a function is there exisying such a function???

11th Jan 2017, 4:11 AM
Ali Kavari
2 Answers
+ 1
make a function that returns what u said
26th Jan 2017, 11:32 AM
Catalin Popinciuc
Catalin Popinciuc - avatar
0
:-(
11th Jan 2017, 5:06 AM
Ali Kavari