cling

Interactive C++ interpreter for executing C++ code interactively

brewmacoslinux
Try with needOr install directly
Source

About

C++ interpreter

Commands

cling

Examples

Start an interactive C++ REPL session$ cling
Execute a C++ file directly$ cling script.cpp
Execute C++ code with includes and print results$ cling -e '#include <iostream>' -e 'std::cout << "Hello" << std::endl;'