小编Asi*_*ani的帖子

5
推荐指数
1
解决办法
2931
查看次数

如何将字符串转换为c中的命令?

在c中是否有办法将字符串转换为命令?例如:

void x(string n){
   //do something
}
void y(int n){
   //do something
}
void z(int n){
   //do something
}
stringForConvert="z(10);y(2);x(\"Its cool\");";
mysteryCommand(stringForConvert);
Run Code Online (Sandbox Code Playgroud)

请注意,我没有奢侈的写入另一个文件并进行编译.

c eval

0
推荐指数
1
解决办法
644
查看次数

标签 统计

c ×1

eval ×1

grails ×1