start thread cpp code example
Example: c++ create thread
void task1(std::string msg)
{
std::cout << "task1 says: " << msg;
}
std::thread t1(task1, "Hello");
t1.join();
void task1(std::string msg)
{
std::cout << "task1 says: " << msg;
}
std::thread t1(task1, "Hello");
t1.join();