Based on reading here:
Cprogramming.com - Tutorials - Templated Functions
I understand that such thing is possible, however I have the following code:
Code:
template <int X, int Y>
class Simulator
{
public:
template<int N, int N1>
void doom::vector<State, N>& run(doom::vector<Input, N1>& input, double ts);
protected:
//some variables here
}
//here's my implementation
template <int X, int Y>
template<int N, int N1>
const doom::vector<State, N>& Simulator<X,Y>::run(doom::vector<Input, N1>& input, double ts);
{
//some code here
return x;
}
//here's my test
int main(){
Simulator<25, 25> s( new Vehicle( WB ) );
doom::vector<Input, 25> u = InputLibrary::getSimpleInputSet( );
//this is where the error happened
doom::vector<State, 25> x = s.run( u, 0.1 );
}
my error is the following:
error: no matching function for call to âSimulator<25, 25>::run(ece373::vector<ece373::vector<double, 2>, 25>&, double)â