c++ threads
- Define the
thread
class from thestd
namespace. - Create a function that represents the code to be executed in the thread.
- Pass the function to the
thread
class constructor. - Call the
join
method on the thread object to wait for the thread to finish its execution.