我可以使用什么函数代码将动态字符串转换为表达式并对其进行评估?
#include <stdio.h>
#include <conio.h>
#include <string.h>
int main() {
char var1[] = "3";
char var2[] = "2";
char var3[] = "5";
char exp[20] = "";
int result;
// Trying to create a random expression "(3+2)*5"
strcat(exp, "( ");
strcat(exp, var1);
strcat(exp, " + ");
strcat(exp, var2);
strcat(exp, " ) * ");
strcat(exp, var3);
result = somefunction(exp);
printf("Result : %i\n", result);
return 0;
}