I have a class declared along the lines of
template<int a, int b>
class C {
public:
array[a][b];
}
and I want to use it as argument in a function like this:
bool DoSomeTests(C &c1, C &c2);
but when I compile, it tells me ‘use of class template requires template argument list.’ I tried
template<int a, int b>
bool DoSomeTests(C &c1, C &c2);
but I get the same error. How can I fix this?
You need to provide arguments to the class template
Cin the declaration ofDoSomeTests:Both the class template
Cand your function templateDoSomeTeststake twointtemplate parameters but the fact that you want to map them from the function template toCcan’t be inferred by the compiler.