std in
= stand in
=標(biāo)準(zhǔn)輸入
= stand in
=標(biāo)準(zhǔn)輸入
記一個(gè)bug: 關(guān)于函數(shù)重復(fù)定義
[gee@localhost c]$ gcc hello.c max.c -o main.out
/tmp/ccsEwEL6.o: In function `max':
max.c:(.text+0x0): multiple definition of `max'
直接編譯hello.c 不加max.c就沒(méi)有問(wèn)題了. 兩個(gè)文件一直編譯就有問(wèn)題: 重復(fù)定義了max函數(shù).
錯(cuò)誤的地方:gcc hello.c max.c (gcc會(huì)嘗試將兩個(gè)文件合到一起,重復(fù)的第一次 hello.c中#include "max.c"的一次,和max.c文件中的一次.
[gee@localhost c]$ gcc hello.c max.c -o main.out
/tmp/ccsEwEL6.o: In function `max':
max.c:(.text+0x0): multiple definition of `max'
直接編譯hello.c 不加max.c就沒(méi)有問(wèn)題了. 兩個(gè)文件一直編譯就有問(wèn)題: 重復(fù)定義了max函數(shù).
錯(cuò)誤的地方:gcc hello.c max.c (gcc會(huì)嘗試將兩個(gè)文件合到一起,重復(fù)的第一次 hello.c中#include "max.c"的一次,和max.c文件中的一次.
2016-07-03
為什么視頻中沒(méi)有引入include max.c文件卻能執(zhí)行? 不懂不懂...
2016-07-03
怎樣在VMware虛擬機(jī)中使用安裝并設(shè)置Ubuntu系統(tǒng)
聽(tīng)語(yǔ)音http://jingyan.baidu.com/article/14bd256e0ca52ebb6d26129c.html
聽(tīng)語(yǔ)音http://jingyan.baidu.com/article/14bd256e0ca52ebb6d26129c.html
2016-06-18
多謝??!看完了,有收獲。期待更新。希望后面能再講講Linux下的C語(yǔ)言程序開(kāi)發(fā)技巧
2016-06-16
剛開(kāi)始學(xué)習(xí)編程,準(zhǔn)備從這里開(kāi)始。謝謝,有什么好的基礎(chǔ)書(shū)籍告訴我吧
2016-06-08
能討論技術(shù)問(wèn)題嗎,一個(gè)叫法 ‘駝峰’ ,都要在這說(shuō)一下,個(gè)人習(xí)慣不一樣,說(shuō)的還那么嘲諷,不喜歡就別看
2016-06-06