contributed by < JeepWay >
quiz1 測驗1
主要差異部分如下
/* Test inserting at the beginning */
for (size_t i = 0; i < N; i++)
list_insert_before(&l, l.head, &items[i]);
/* Test inserting at the end */
JeepWay changed a month agoView mode Like Bookmark
基本編譯選項
-o [filename]: Place the output into [filename]
-c: Compile and assemble, but do not link.如不加的話果
:::info
沒有 main() 的 program 要加上 -c 才能 compile,否則會失敗,錯誤訊息如下。(.text+0x1b): undefined reference to `main'
collect2: error: ld returned 1 exit status
沒有 main() 的 program 編譯後最好命名為 XXX.o,再與主程式檔案做 link。
JeepWay changed 2 years agoView mode Like Bookmark