C++ 解释器/控制台/片段编译器

2022-01-11 00:00:00 interactive console interpreter c++

我正在寻找可以输入 C++ 代码片段的程序在一个窗口中,按一个按钮,然后在另一个窗口中获得输出.编译应该以某种方式隐藏在按钮后面.在一个每个片段的基础会很好,完全互动可能会问太多了.它应该在 Linux/Unix 下运行.主要用例是学习/测试/短调试等

I am looking for a program where I can enter a C++ code snippet in one window, press a button, and get output in another window. Compilation should somehow be hidden behind the button. On a per-snippet basis would be fine, full interactive probably asking too much. It should run under Linux/Unix. Main use case would be learning/testing/short debugging, etc.

我找到的相关资料:

-- Python 的 Reinteract 项目(我听说 sage 具有类似的功能)

-- the Reinteract project for python (which i'm told sage has features similar to)

-- 此处为 C# 的同一线程:C# Console?

-- the same thread for C# here: C# Console?

-- CERN ROOT 项目中的 CINT 解释器(可能很接近,但周围可能有更舒适的应用程序)

-- the CINT interpreter from the CERN ROOT project (which may be close, but maybe there are more comfortable apps around)

--一些叫做Quickly Compile或Code Snippet的程序,是M$.

-- some programs called Quickly Compile or Code Snippet, which are M$.

推荐答案

http://codepad.org/ 有效很好地为此目的.默认情况下,它会在您点击提交时运行您粘贴的内容并显示结果(或您可能遇到的任何错误).

http://codepad.org/ works nicely for this purpose. By default, it will run what you paste when you hit submit and display the result (or any errors you might have).

相关文章