[問題] 統計F-test 書上的example 編譯時發生錯誤
老闆要我用C++跑統計,不過我C++只自學了幾天
書上的example F-test Code: http://src.wtgstudio.com/?ilOBzF
書上的算式 code: http://src.wtgstudio.com/?8sUHhy
nr.h code如下:http://src.wtgstudio.com/?c7xhbX
這是是類似http://caterpillar.onlyfun.net/Gossip/CppGossip/FunctionABC.html
中math.cpp , math.h , main.cpp的做法嗎?
我在DEV-C++開新專案,加入ftest.cpp,nr.h , nr.cpp 貼上去出現如下錯誤
[Linker error] undefined reference to `NR::avevar(NRVec<double> const&,
double&, double&)'
[Linker error] undefined reference to `NR::avevar(NRVec<double> const&,
double&, double&)'
[Linker error] undefined reference to `NR::gasdev(int&)'
[Linker error] undefined reference to `NR::gasdev(int&)'
[Linker error] undefined reference to `NR::ftest(NRVec<double> const&,
NRVec<double> const&, double&, double&)'
ps. 小弟因為論文需要,這幾天才開始學C++所以還不是很清楚...
希望板上的大師能指引我一條路!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.167.34.95
→
05/10 15:07, , 1F
05/10 15:07, 1F
→
05/10 15:09, , 2F
05/10 15:09, 2F
→
05/10 15:10, , 3F
05/10 15:10, 3F
推
05/10 16:24, , 4F
05/10 16:24, 4F
→
05/10 16:24, , 5F
05/10 16:24, 5F
※ 編輯: lyle12345 來自: 210.62.176.98 (05/12 01:13)
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章