各位大牛好,小弟請教下怎么在linux中運行我的程式?寫了個最簡單的獲取行程id的函式。
#include <unistd.h>
int main()
{
printf("my parent 'pid=%d\n",getppid);
return 0;
}
要怎么列印出我要的結果?謝謝
uj5u.com熱心網友回復:
如果是bash編譯器的話在檔案bash [檔案名]就行,如果不是bash的話,給檔案執行權限,然后./[檔案名]也可以轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/264649.html
標籤:應用程序開發區
下一篇:【求助】無法進入ubuntu系統,Failed to start Thunderbolt system service.
