Sheikh Usman
Sheikh Usman

Reputation: 21

An irb-type tool for C/C++

When writing ruby code, it is easy to test how different functions behave by testing them out in irb. But to test code in C, I usually have to open up a separate IDE and write code there to test how it works. Is there an interpreter-like tool available in Unix or Windows platform?

Upvotes: 1

Views: 462

Answers (3)

Max
Max

Reputation: 1044

If you just want to test a copy & paste-able bit of code, I often use CodePad to see the results of single functions immediately without compiling. It has its limits, though.

Upvotes: 1

BobbyShaftoe
BobbyShaftoe

Reputation: 28499

C is not an interpreted language. However, there are a couple interpreters. I think the best one is Ch however it is not open source. CINT is open source:

http://directory.fsf.org/project/CINT/

Upvotes: 1

igowen
igowen

Reputation: 651

I think Ch is the closest you'll get to a C/C++ REPL. I believe it supports all features of C and some of C++.

Upvotes: 0

Related Questions