I need some help. I am trying to instantiate a Template and call a
member function, but have not been able -
Now this is what I am trying to do:
foo.h
=========
template<typename foo1>
class myClass
{
public:
void display(foo1);
};
template <typename foo1>
void myClass<foo1>::display(foo1 outdata)
{
cout<<outdata<<"\n";
}
foo.cpp
========
int main(int argc, char* argv[])
{
myClass mc; // compiler complains here-Is there anyway around
this?
myClass<char> mc; //compiler accepts this-But I don't want this?
return (0);
}
Many thanks for the help. I appreciate -
t