Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ interpreter / console / snippet compiler

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.

Related stuff I found:

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

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

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

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

like image 782
daspostloch Avatar asked Jul 27 '09 16:07

daspostloch


3 Answers

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).

like image 93
Evan Teran Avatar answered Sep 23 '22 02:09

Evan Teran


Dinkumware has a page for this AND you can choose the compiler

http://dinkumware.com/exam/default.aspx

like image 30
pgast Avatar answered Sep 22 '22 02:09

pgast


Do something like this ? test a C# snippet code by just copying it to the clipboard and then type csc.exe: http://reboltutorial.com/blog/redirect-shell-to-rebol-console/

like image 28
Rebol Tutorial Avatar answered Sep 20 '22 02:09

Rebol Tutorial