I think I just need another set of eyes to find out what I'm doing wrong.
This is the error:
bfgs_template.hpp:478:5: error: ‘di’ was not declared in this scope
bfgs_template.hpp:478:8: error: ‘b’ was not declared in this scope
and this is a snapshot of the code:
template<typename T>
void update_d();
template<typename T>
class BFGSB: public BFGS<T>{
protected:
double *di;
int b;
public:
friend void update_d<T>();
};
template<typename T>
void update_d(){
di[b] = 0.0;
}
Btw. While I didn't post the rest of the code. di is initialized and if I make update_d a member of the class. Everything runs smooth.