online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
void caller1_foo1(); void caller1_foo2(); void caller1_foo3(); void caller2_foo1(); void caller2_foo2(); void caller2_foo3(); int main() { caller1_foo1(); // 1 caller2_foo1(); // 1 caller1_foo2(); // 1 caller2_foo2(); // 1 caller1_foo3(); // 1 caller2_foo3(); // 2 }
static int foo1() { static int i = 0; return ++i; } static inline int foo2() { static int i = 0; return ++i; } inline int foo3() { static int i = 0; return ++i; }
#include "header.h" #include <iostream> void caller1_foo1() { std::cout << foo1() << std::endl; } void caller1_foo2() { std::cout << foo2() << std::endl; } void caller1_foo3() { std::cout << foo3() << std::endl; }
#include "header.h" #include <iostream> void caller2_foo1() { std::cout << foo1() << std::endl; } void caller2_foo2() { std::cout << foo2() << std::endl; } void caller2_foo3() { std::cout << foo3() << 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