關於在系統下 compiler程式的方法 - Linux

By Harry
at 2010-09-29T20:11
at 2010-09-29T20:11
Table of Contents
目前用VMWARE 灌了fedora
起因是有課程 老師叫我們在linux系統下
跑一個程式
程式如下
int main()
{
pid_t pid;
/* fork another process */
pid = fork();
if (pid < 0) { /* error occurred */
fprintf(stderr, "Fork Failed");
exit(-1);
}
else if (pid == 0) { /* child process */
execlp("/bin/ls", "ls", NULL);
}
else { /* parent process */
/* parent will wait for the child to complete */
wait (NULL);
printf ("Child Complete");
exit(0);
}
}
但是程式要寫在哪邊 用終端機去compiler結果呢
我想好好學習linux系統
請問有大大可以指點一下嗎? 感恩.
--
起因是有課程 老師叫我們在linux系統下
跑一個程式
程式如下
int main()
{
pid_t pid;
/* fork another process */
pid = fork();
if (pid < 0) { /* error occurred */
fprintf(stderr, "Fork Failed");
exit(-1);
}
else if (pid == 0) { /* child process */
execlp("/bin/ls", "ls", NULL);
}
else { /* parent process */
/* parent will wait for the child to complete */
wait (NULL);
printf ("Child Complete");
exit(0);
}
}
但是程式要寫在哪邊 用終端機去compiler結果呢
我想好好學習linux系統
請問有大大可以指點一下嗎? 感恩.
--
Tags:
Linux
All Comments

By Megan
at 2010-10-02T18:26
at 2010-10-02T18:26

By Kyle
at 2010-10-06T21:05
at 2010-10-06T21:05

By Callum
at 2010-10-10T02:13
at 2010-10-10T02:13

By Blanche
at 2010-10-14T22:34
at 2010-10-14T22:34

By Susan
at 2010-10-15T17:33
at 2010-10-15T17:33

By Valerie
at 2010-10-17T16:10
at 2010-10-17T16:10

By Quanna
at 2010-10-20T19:01
at 2010-10-20T19:01

By Isabella
at 2010-10-22T23:36
at 2010-10-22T23:36

By Ophelia
at 2010-10-24T09:53
at 2010-10-24T09:53

By Harry
at 2010-10-28T15:22
at 2010-10-28T15:22

By Lily
at 2010-11-02T11:34
at 2010-11-02T11:34

By Elvira
at 2010-11-04T01:09
at 2010-11-04T01:09

By Agnes
at 2010-11-06T03:04
at 2010-11-06T03:04
Related Posts
想要推廣openoffice嗎?但是要低調…

By Caroline
at 2010-09-29T17:16
at 2010-09-29T17:16
不好意思,問一個很粗淺的問題

By Olive
at 2010-09-29T16:51
at 2010-09-29T16:51
有軟體可以從 windows 去 tail linux上的檔案嗎?

By Edith
at 2010-09-29T16:27
at 2010-09-29T16:27
Ubuntu 快速開機調校的心得

By Kristin
at 2010-09-29T14:31
at 2010-09-29T14:31
wine無法執行程式

By Skylar DavisLinda
at 2010-09-29T13:10
at 2010-09-29T13:10