看板 EE_DSnP 關於我們 聯絡資訊
作業中 a.cpp 需要 include a.h b.h b.cpp 需要 include b.h main.cpp 需要 include a.h 那我可以先用 a.cpp + a.h -> a.o b.cpp + b.h -> b.o main.cpp -> main.o 然後將他們再一起組合成一個執行檔 因為我是這樣想的 不管如何包含a.h b.h 終究我都會把他們三個兜在一起 所以程式執行的時候他都找的到 這樣想可以嗎? 還是哪裡有錯呢? -- Every thing can be wrong unless you can proof it is true. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.4.235
timrau:Without including a.h, how could the compiler know what 03/05 18:48
timrau:"class A" mean? 03/05 18:48