Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ create thread

void task1(std::string msg)
{
    std::cout << "task1 says: " << msg;
}

std::thread t1(task1, "Hello");

t1.join(); 
 
PREVIOUS NEXT
Tagged: #create #thread
ADD COMMENT
Topic
Name
7+4 =