[問題] 沒辦法使用pipe
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Windows
Eclipse IDE for C/C++ Developers, Version: Kepler Service Release 1
Toolchain: MinGW GCC
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
Boost
問題(Question):
最近在複習以前寫的pipe()
只是以前是用C然後在Linux編譯 現在用C++在Windows編譯
然後發現沒辦法使用 int test[2]; pipe(test); 這種方式建立pipe
有稍微估狗到 C++為了一些考量 標準函示庫把unistd拿掉
必須 include <unistd.h>
只是用起來依然報錯 求大神指教
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
error: 'pipe' was not declared in this scope
程式碼(Code):(請善用置底文網頁, 記得排版)
#include <unistd.h>
...
int main() {
...
int test[2];
pipe(test);
...
}
補充說明(Supplement):
無
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.240.225.190
※ 文章網址: http://www.ptt.cc/bbs/C_and_CPP/M.1413571172.A.765.html
→
10/18 15:11, , 1F
10/18 15:11, 1F
→
10/18 15:12, , 2F
10/18 15:12, 2F
→
10/18 15:17, , 3F
10/18 15:17, 3F
推
10/18 23:12, , 4F
10/18 23:12, 4F