execute C++ from String variable

前端 未结 6 921
北恋
北恋 2020-12-01 21:11

it is possible in C++ to execute the C++ code from string variable. Like in Javascript:

var theInstructions = \"alert(\'Hello World\'); var x = 100\";

var F         


        
6条回答
  •  情深已故
    2020-12-01 22:00

    Short answer is no. Hackers would have a field day. You can however use the Windows IActiveScriptSite interface to utilize Java/VB script. Google IActiveScriptSite, there are numerous examples on the web. Or you can do what I am currently doing, roll your own script engine.

提交回复
热议问题