online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include "a.h" using namespace std; void addItem(A& _a,string n) { _a.m_B.emplace_back(n); }; int main() { A a; addItem(a, "a"); addItem(a, "b"); std::cout << a.m_B.size() <<"\n"; std::cout << "Hello World!\n"; }
#pragma once #include <string> #include <vector> #include <iostream> using namespace std; class B { public: string n; B(string name) { this->n = name; cout << this->n<< " create" << endl; } ~B() { cout << this->n << " destory" << endl; } }; class A { public: vector<B> m_B; A():m_B(vector<B>{}) { cout << "class A create" << endl; }; ~A() { cout << "class A destory" << 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