How to implement threading in C++ ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to implement threading in C++ ?

Looking for any reference material to multiple threading.

18th Dec 2016, 7:37 PM
Shashank Sharma
Shashank Sharma - avatar
1 Answer
+ 2
First Question: Which Plattform? Which C++-Version? Since C++11 we have std::thread, which helps a lot with threading. => http://en.cppreference.com/w/cpp/thread/thread so basically: void thread_main() { std::cout << "hello thread"; } int main() { auto thread = std::thread(thread_main); std::cout << "Hello Main"; thread.join(); return 0; }
18th Dec 2016, 7:43 PM
John Doe
John Doe - avatar