Multi-Threading #include #include // C++ 11 feature using namespace std; void start_func_for_thread ( ) { cout << myThread lives!\n ; do_func_a (); } int main() { cout << Main thread starting.\n ; thread myThread (start_func_for_thread); cout << Main thread continues!\n ; // main thread waits here until myThread finishes myThread.join (); do_func_b (); return 0; }
{}