online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <thread> #include <string> #include <iostream> struct test_t { test_t() : str_{"hello world"} { t_ = std::thread([this]{ std::cout << "str = " << str_ << std::endl; }); t_.detach(); } private: std::thread t_; std::string str_; }; int main() { test_t t; getchar(); 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