Execute C++ code snippets, directly on the command line.
$ instantcpp 'std::cout << "Hello World!" << std::endl;'
Hello World!
instantcpp gently grabs your naked C++ snippet, lovingly wraps it in a tiny warm blanket of cozy boilerplate code, compiles and executes the whole burrito, and then it even cleans up after itself. How nice! 💝
instantcpp [options] <code>
--cxx=<value>
,--cxx <value>
: Use a custom compiler (instead ofg++
)--valgrind
: Execute snippet in Valgrind--gdb
: Execute snippet in GDB-c <value>
: Add an option to compiler flags. Defaults are-W -Wall -Wextra -Wpedantic -std=c++11 -O0
(fairly many warnings, C++11, no optimization).-l <value>
: Add an option to linker flags. None by default.-i <value>
: Add another#include
to the wrapper code. See code for defaults.