C
Chris
Hi,
It have a simple question about templates. I am using the OpenWatcom
compiler. Here is some test code
#include <vector>
using namespace std;
int testInt(vector<int>& x1)
{
return x1[0];
};
template<typename T>
T testTemplate(vector<T>& x1)
{
T y = x1[0];
return y;
};
The compiler complains about the function "testTemplate": non-type
parameter supplied for a type argument.
I am not seeing the problem. I appreciate any help in this matter.
Thanks
Chris
It have a simple question about templates. I am using the OpenWatcom
compiler. Here is some test code
#include <vector>
using namespace std;
int testInt(vector<int>& x1)
{
return x1[0];
};
template<typename T>
T testTemplate(vector<T>& x1)
{
T y = x1[0];
return y;
};
The compiler complains about the function "testTemplate": non-type
parameter supplied for a type argument.
I am not seeing the problem. I appreciate any help in this matter.
Thanks
Chris