从网页编译和运行C / C ++程序 [英] Compiling and Running C/C++ Programs from Webpage
问题描述
我是ASP.NET的新手,我在这里遇到了一个挑战:
我必须创建一个应该从textarea获取C / C ++程序的网页当在网页上点击一个按钮时,使用标签产生textarea下方程序的输出。
我可以轻松创建首页(textarea,按钮,标签或其他控件)并在后端页面(cs页面)中阅读textarea的内容。
但我不知道如何编译和运行程序从textarea读取并生成输出,该输出可以分配给网页上的标签。
任何对此的帮助将非常感激。
谢谢
这里写的是坏消息。
什么阻止某人发布可以消灭你的网络服务器的代码?
这听起来可能微不足道,但答案是:这样做,你需要一些C ++服务器端的编译器。没有奇迹这样的东西。或者您可能需要自己创建编译器。你需要检查编译器的许可证,如果它不是由你自己编写的。
-SA
I am new to ASP.NET and I have a challenge here:
I have to create a webpage which should take C/C++ program from textarea and should produce output of the program below the textarea using label when a button is clicked on the webpage.
I have no difficulty creating the front page(textarea,button,label or other controls) and reading the content of textarea in back end page(cs page).
But I don't have any idea how I can compile and run the program read from textarea and produce the output which can be assigned to a label on webpage.
Any help on this will be much appreciated.
Thanks
This has bad news written all over it.
What's stopping someone from posting code that can wipe out your web server?
It may sound trivial, but the answer is: to do so, you would need some C++ compiler on the server side. There is no such thing as miracle. Or you may need to create a compiler by yourself. And you would need to check up the license for the compiler, if it's not all written by your own.
—SA
这篇关于从网页编译和运行C / C ++程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!