class myFunc { public: void function() (/* No Parameters */) { cout << "myFunc object." << endl; } }; /*************************************/ myFunc myFunc1; thread thread1(myFunc1); if (thread1.joinable()) { thread1.join(); }