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 <stdio.h> #include <utility> #include <string> #include <iostream> template<typename T, typename... Args> std::string log_kv_rec(std::string& current, std::pair<std::string, T>& a, std::pair<std::string, Args>&... args) { current += a.first + "=" + std::to_string(a.second); } template<typename... Args> bool log_kv(const std::string& a, std::pair<std::string, Args>&... args) { int i = 0; std::string current; log_kv_rec( current, args...); std::cout << current << std::endl; } int main() { auto p1 = std::pair<std::string, int>{"Hello", 1}; auto p2 = std::pair<std::string, std::string>{"Hello", "D"}; log_kv("BaseRecovery", p1, p2); 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