Add ch02 C++ threading equivalents
This commit is contained in:
16
src/ch02/hello_cpp.cpp
Normal file
16
src/ch02/hello_cpp.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
void
|
||||
hello()
|
||||
{
|
||||
std::cout << "Hello World\n";
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char* argv[])
|
||||
{
|
||||
std::thread t(hello);
|
||||
t.join();
|
||||
}
|
||||
Reference in New Issue
Block a user