online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include "print.hpp" #include "header.hpp" int main() { errorCodes<int>[15] = "SomeString"; //This is safe print(); }
#ifndef HEADER_H #define HEADER_H #include <map> template <class T> std::map<T, std::string> errorCodes{}; //zero initialized value #endif
#ifndef PRINT_H #define PRINT_H void print(); #endif
#include "print.hpp" #include "header.hpp" #include <iostream> void print() { std::cout << errorCodes<int>.at(15) << std::endl; // This is safe: prints SomeString }

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