Can someone explain or give me a link on how to create templates?
specially on how to use the template< thingy. For example I have
seen this:
template <class T>
template<typename T>
template <>
each on almost identical situations... so whats the difference?
for example:
#include <iostream>
template <class T>
class Test
{
public:
T i;
};
template <typename T>
class Test2
{
public:
T i;
};
using std::cout;
int
main(void)
{
Test<inti;
Test2<intj;
i.i=1;
j.i=1;
cout << i.i << '\t' << j.i << '\n';
return 0;
}
whats the difference between Test and Test2 templates??