I used a simple class for a test program about templates, this is what I did:
template <typename T>
class test
{
public:
test<T>::test();
T out();
};
template <typename T>
test<T>::test()
{
}
T test<T>::out()
{
}
int main()
{
//test<int> t;
}
But when I try to compile it says 'T' : undeclared identifier and use of class template requires template argument list , pointing to the same line, where I have implemented the method out() . Can anyone please explain what the problem is?? I'm using visual studio 2008.