online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> constexpr auto PI = 3.1415926; template <typename F, typename ... Args> inline void execute(F e, Args&& ... args) { auto f = e(std::forward<Args>(args)...); std::cout << "EXECUTE: " << f << "\n"; } template <typename T> constexpr auto square(T const& x) -> decltype(x * x) { return x * x; } float add(float a, float b) { return a + b; } int main() { std::cout << "PI: " << PI << "\n"; execute(add, 7, 42); std::cout << "SQUARE(7): " << square(7) << "\n"; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue