[問題] pthread一點小問題
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
linux
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
#include <pthread.h>
問題(Question):
給一個數字
然後用thread印出<=他的所有質數
餵入的資料(Input):
7
預期的正確結果(Expected Output):
2 3 5 7
錯誤結果(Wrong Output):
啥都沒出現QQ
程式碼(Code):(請善用置底文網頁, 記得排版)
http://codepad.org/XKthHkQi
補充說明(Supplement):
只差一行printf("\n");
就決定印不印的出答案OAO
感謝!!: )
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.114.86.206
→
10/13 17:53, , 1F
10/13 17:53, 1F
→
10/13 21:50, , 2F
10/13 21:50, 2F
→
10/14 00:01, , 3F
10/14 00:01, 3F
→
10/14 08:16, , 4F
10/14 08:16, 4F
→
10/14 08:18, , 5F
10/14 08:18, 5F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章