CS50終端機編譯教學

在IDE上用vim編輯,


http://linux.vbird.org/linux_basic/⋯⋯


$ vim hello.c 按i鍵入insert


#include <stdio.h> int main(void) { printf(“Hello,world\n”); }


鍵入esc




:wq 結束 並儲存修改


$ ./a.out 執行 至於clang 跟 gcc的差別可以參考這篇


http://tieba.baidu.com/p/1657898448 http://www.cnblogs.com/qoakzmxncb/a⋯⋯


$ rm a.out


$ clang -o hello hello.c 創立一個輸出檔


留言

這個網誌中的熱門文章

面試 (網路搜尋的資源)

bitwise operation 面試考題