online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include<map> #include<string> #include<vector> struct configfs { int & foo; configfs(int & foo_) : foo(foo_) {} void set_foo(int & foo_) { foo = foo_; } }; int main() { int a = 1; configfs conf(a); a = 3; std::cout << conf.foo<<std::endl; // 3 std::cout << a<<std::endl;; // 3 int b = 2; conf.set_foo(b); std::cout<<a<<std::endl; //prints 2 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