online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <map> #include <vector> #include <iostream> struct Data { int x; int y; int z; }; std::map<int, std::vector<Data>> myMap; int main() { myMap[123].push_back({1,2,3}); myMap[123].push_back({11,22,33}); myMap[456].push_back({4,5,6}); myMap[456].push_back({44,55,66}); std::cout << myMap[123][0].x << ", " << myMap[123][0].y << ", " << myMap[123][0].z << "\n"; std::cout << myMap[123][1].x << ", " << myMap[123][1].y << ", " << myMap[123][1].z << "\n"; std::cout << myMap[456][0].x << ", " << myMap[456][0].y << ", " << myMap[456][0].z << "\n"; std::cout << myMap[456][1].x << ", " << myMap[456][1].y << ", " << myMap[456][1].z << "\n"; 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