online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> #include <vector> #include <memory> struct A { A(std::vector<int> v) : v_(std::move(v)) { printf("A(no const): %p, %p\n", v.data(), v_.data()); } std::vector<int> v_; }; struct B { B(const std::vector<int> v) : v_(std::move(v)) { printf("B(const): %p, %p\n", v.data(), v_.data()); } std::vector<int> v_; }; int main() { std::vector<int> va(100); printf("va = %p\n", va.data()); A a(std::move(va)); std::vector<int> vb(100); printf("vb = %p\n", vb.data()); B b(std::move(vb)); 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