online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include<map> #include<string> #include<vector> #include "log.h" using namespace std; int main() { logging log; return 0; }
#pragma once #include <unordered_map> #include <string> class logging { public: std::unordered_map<int, std::string> m_log_levels; private: int m_level; public: logging(); void setLevel(int level); void log(const char* message); };
#include <iostream> #include <unordered_map> #include <string> #include "log.h" //definition of default ctor using member initializer list logging::logging() :m_log_levels{{0, "error"},{1, "warning"}, {2,"info"}}, m_level(2){ } void logging::setLevel(int level) { m_level = level; } void logging::log(const char* message) { std::string sm = "[" + m_log_levels.at(m_level) + "]: "; std::cout << sm + message << 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