Numerical recipes in C++
I just received the Numerical Recipes in C++ (Cambridge) and i have this question
How can i return one vector allocated using the NR.H ?
Let's say i have this class
foo.h
class foo:
{
public:
float *func1 {return xvec;}
float **func2 {return xvec2;}
private:
Vec_DP *xvec_p;
Mat_DP **xvec2_p;
}
foo.cpp
foo::foo()
{
Vec_DP &xvec=*xvec_p;
Mat_DP &xvec2=**xvec2_p;
}
This doesn't work. The compiler syar thar can't convert *Mat_DP to **Mat_DP.
Can anyone have the same problem?
P.S. I don't want to hear using othel library like GSL
|