online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include "two_b.h" int main() { Car bmw; bmw.car_run(); bmw.f1(); return 0; }
#include <functional> using CallbackType = std::function<void()>; class Car { public: void car_run(void); void car_stop(void); CallbackType f1; private: CallbackType callbackHandler; };
#include "one_a.h" #include <iostream> void Car::car_run(void) { std::cout<<"Car running"<<std::endl; } void Car::car_stop(void) { std::cout<<"Car stopping"<<std::endl; }
#include "one_a.h" class Boat { public: Boat(Car& car_itf); static void boat_run(void); static void boat_stop(void); private: Car& car_itf_; };
#include "two_b.h" #include <iostream> Boat::Boat(Car& car_itf):car_itf_{car_itf}{ car_itf_.f1 = std::bind(&Boat::boat_run); } void Boat::boat_run(void) { std::cout<<"Boat running"<<std::endl; } void Boat::boat_stop(void) { std::cout<<"Boat running"<<std::endl; }

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