C++: multithreading with c++11

Example:

#include 
void myFunction() {
    std::cout << "Thread executed";
}
C++11 introduced native support for multithreading.

Solution:

std::thread t1(myFunction);
t1.join();

Beginner's Guide to C++