online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include "utility.h" int main() { utility::changeColor();//used utility:: }
#ifndef UTILITY_H //USED INLCUDE GUARDS #define UTILITY_H namespace utility { void changeColor(); //this function declaration is now inside the utitliy namespace } #endif
#ifndef VARIABLES_H //USE INCLUDE GUARDS #define VARIABLES_H namespace var { inline int colorCounter{}; //this is a nondefininig declaraiton for colorCounter } #endif
#include "utility.h" #include "variables.h" namespace utility { void changeColor() { if (var::colorCounter == 0) { ; } else if (var::colorCounter == 1) { ; } else if (var::colorCounter == 2) { ; } else if (var::colorCounter == 3) { ; } else { ; var::colorCounter = -1; } var::colorCounter++; } }

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