2006-02-13から1日間の記事一覧
pthreadsまとめ。まずは基本から。 #include <stdio.h> #include <unistd.h> #include <pthread.h> #define THREADSNUM 5 void func(int *); int main(void){ pthread_t thread[THREADSNUM]; int i; for(i=0; i</pthread.h></unistd.h></stdio.h>
ネタ元 http://www.nyasoku.com/archives/50352203.html ジョーカーを除いたトランプ52枚の中から1枚のカードを抜き出し、表を見ないで箱の中にしまった。そして、残りのカードをよく切ってから3枚抜き出したところ、3枚ともダイアであった。このとき、…