I am working on a project for a C++ class. We need to implement an abstract problem solver that can solve simple, yet different problems.
I am doing this by creating a 'rule' class for each problem such that they define the specifics for each problem. The intention is to pass this class as a template parameter to a solver class.
the solver class is defined:
The only error I am getting says I am creating Solver without a template parameter. I am a C programmer coming to C++ and I have stared at the code for hours...so I think I am missing some basic syntax/scoping issues.Code:template < class T > class Solver { //solver code //uses template parameter to call two simple functions } and in my main function: Solver::Solver< ClockPuzzle::ClockPuzzle > puzzle( goal, hours, time ); puzzle.solve();
Any help would be greatly appreciated.