开发者

Executing strings in c++ [duplicate]

开发者 https://www.devze.com 2023-01-27 17:32 出处:网络
This questio开发者_如何学编程n already has answers here: Closed 12 years ago. Possible Duplicate:
This questio开发者_如何学编程n already has answers here: Closed 12 years ago.

Possible Duplicate:

Dynamic source code in C++

is there anything in c++ that executes strings? like in python, there are exec, and to some extent eval


Actually no.

I don't know if this exceeds your needs,

http://boost-sandbox.sourceforge.net/libs/proto/doc/html/index.html


C# can do something like this, but i dont believe c++ can with standard libraries.


As C++ is a compiled language, there is no possibility to evaluate/execute runtime-generated code. Of course, you could send such code to a C++ compiler at runtime and start a new process using the built binary. But I think that would not address your purpose.

0

精彩评论

暂无评论...
验证码 换一张
取 消