mirror of
https://github.com/Relintai/programming_tutorials.git
synced 2025-04-25 21:55:03 +02:00
20 lines
253 B
C++
20 lines
253 B
C++
#ifndef THREAD_CREATION_H
|
|
#define THREAD_CREATION_H
|
|
|
|
|
|
#include <iostream>
|
|
#include <thread>
|
|
|
|
using namespace std;
|
|
|
|
void hello_thread() {
|
|
cout << "Hello, thread!" << endl;
|
|
}
|
|
|
|
void create_thread() {
|
|
thread t(hello_thread);
|
|
t.join();
|
|
}
|
|
|
|
#endif
|