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::string v) : v_(std::move(v)) { printf("A(no const): %p, %p\n", v.data(), v_.data()); } std::string v_; }; struct B { B(const std::string v) : v_(std::move(v)) { printf("B(const): %p, %p\n", v.data(), v_.data()); } std::string v_; }; int main() { std::string str = "HHX"; printf("va = %p\n", str.data()); A a(std::move(str)); std::string str2 = "HHY"; printf("vb = %p\n", str2.data()); B b(std::move(str2)); 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