Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
thread-destructor
#include<thread> #include<iostream> struct tes { //Constructor tes() { std::cout << "Constructor\n"; } //Destructor virtual ~tes() { std::cout << "Destructor\n"; } void operator()() { for(int i = 0 ; i < 15 ; ++i ) std::cout << "Hello\n"; } }; typedef struct tes TES; // Method void Input() { TES t1; //Line #1 //t1(); //Line #2 std::thread thr_1(t1); //Line #3 thr_1.join(); //Line #4 //thr_1.detach(); //Line #5 } //main() int main(){ Input(); //calling this with parameters //... }
run
|
edit
|
history
|
help
0
Sum of numbers in a series using sum formular
xyz1_1 programm
#18
Multi Inheritance
VC typeid example
Adaptive return type
MyCodeWindows
C++ standard library formatted input hexadecimal float without prefix or exponent test case
RecursiveDivide
Time Zone Registry