摘要:
在 C 語言里,若調用一個未聲明的函數,編譯器會進行隱式聲明。編譯器默認這個函數返回 int 類型,并且對參數的數量和類型不做嚴格檢查。 // test.c #include <stdio.h> // 沒有聲明的函數調用 void main() { int num = 10; int *ptr = 閱讀全文
posted @ 2025-02-10 20:44
HilbertNote
閱讀(72)
評論(0)
推薦(0)
摘要:
當多個.c文件使用同一個const全局變量,一般這個變量在.c中定義,在對應的.h中聲明。例如 main.c #include "main.h" const int CONST_VALUE=1; main.h extern const int CONST_VALUE; 閱讀全文
posted @ 2025-02-10 13:04
HilbertNote
閱讀(15)
評論(0)
推薦(0)
摘要:
cmake .. -DCMAKE_BUILD_TYPE=DEBUG make 閱讀全文
posted @ 2025-02-10 11:06
HilbertNote
閱讀(13)
評論(0)
推薦(0)

浙公網安備 33010602011771號