online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <functional> int thirds(int a) { return a + 1; } template <typename T, typename B , typename L> //------------------------------------------------VVVVV- int hello(T x, B y, L func) { int first = x + 1; int second = y + 1; int third = func(6); return first + second + third; } int add() { std::function<int(int)> myfunc = thirds; return hello(1, 1, myfunc); } int main() { std::cout << add(); return 0; }

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