2008/02/26

extern "C"

Reference: http://blog.anglee.org/2007/02/extern-c.html

簡單來說

有個 function 定義為 void func(int a, float b);

用 C Compiler compile 後內部名稱會類似 _func
用 C++ Compiler compile 後內部名稱會類似 _func_int_float

C++ compiler 會在 function call 出現在 extern "C" scope 中時,產生並使用 C style 的內部名稱。

要內部名稱一樣 Linking 時才不會出錯。

2008/01/20

NS2 快速入門: DV-distance 模擬 (7)

最後完成的 code 與參考文件

有問題歡迎一起討論

DV-Distance NS2 Simulation

加入這個 Agent 的方法請參考這篇文章