質問編集履歴
1
書き間違いを修正しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -10,8 +10,11 @@
|
|
10
10
|
<thread>バージョン
|
11
11
|
```c++
|
12
12
|
#include<thread>
|
13
|
+
|
13
14
|
using namespace std;
|
14
15
|
|
16
|
+
int main()
|
17
|
+
{
|
15
18
|
for(int i=0;i<10;i++)
|
16
19
|
{
|
17
20
|
void a();
|
@@ -32,13 +35,17 @@
|
|
32
35
|
}
|
33
36
|
|
34
37
|
return 0;
|
38
|
+
}
|
35
39
|
```
|
36
40
|
|
37
41
|
<pthread.h>バージョン
|
38
42
|
```c++
|
39
43
|
#include <pthread.h>
|
44
|
+
|
40
45
|
using namespace std;
|
41
46
|
|
47
|
+
int main()
|
48
|
+
{
|
42
49
|
for(int i=0;i<10;i++)
|
43
50
|
{
|
44
51
|
|
@@ -56,6 +63,7 @@
|
|
56
63
|
pthread_join(t2, NULL);
|
57
64
|
pthread_join(t3, NULL);
|
58
65
|
|
59
|
-
return 0;
|
60
66
|
}
|
67
|
+
return 0;
|
68
|
+
}
|
61
69
|
```
|