online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <functional> class Actions { public: Actions(){} void doSmthg(){ std::cout<<"do something called"<<std::endl; } }; class Button { public: Button() {}; void setFunc(std::function<void ()> eventFunction) { fn = eventFunction; } void onClick(){ std::cout<<"button clicked"<<std::endl; //call the function on the passed object fn(); } private: std::function<void ()> fn; }; int main() { Actions action; Button button; button.setFunc(std::bind(&Actions::doSmthg, action)); button.onClick(); 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