I get the following error. If you could help debug what is wrong that would be awesome.
initializer specified for static member function ‘static const csc350Lib_calculus_snle::SolutionNLE* csc350Lib_calculus_snle::NonlinearSolver::solve(csc350Lib_calc_base::Function1D*, float, float, float)’
#ifndef NONLINEARSOLVER_H
#define NONLINEARSOLVER_H
#include "Function1D.h"
#include "SolutionNLE.h"
usingnamespace csc350Lib_calc_base;
namespace csc350Lib_calculus_snle
{
class NonlinearSolver
{
public:
NonlinearSolver(void);
virtual ~NonlinearSolver(void);
staticconst SolutionNLE* solve(Function1D* f, float a, float b, float tol) = 0;
//This is a pure abstract method that should be implemented by subclasses.
//The parameters are a pointer to the NLE's function, the endpoints of the search's bracket,
//and the tolerance of the search. The function (again, implemented by the subclasses) should
//return a pointer to a SolutionNLE object.
private:
};
}
#endif /* NONLINEARSOLVER_H */
(Totally aside from the real problem, consider either not providing a default constructor or destructor, or, if you must (say due to a virtual method), then move the (empty body) implementation to the header file.