Compile simple string

后端 未结 6 1812
星月不相逢
星月不相逢 2021-02-15 13:57

Was just wondering if there are any built in functions in c++ OR c# that lets you use the compiler at runtime? Like for example if i want to translate:

!print \"         


        
6条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-15 14:46

    Nick's suggestion is good, but there is an alternative which is probably simpler to implement (but might not be appropriate for all projects). If you can assume that your user has a compiler installed you can generate a file and then compile it using their compiler.

提交回复
热议问题