if we put template class member function defination in .cpp(not in headerfile) with explicit instant
- by user323422
For example
//temp.h
class ABC
{
pubilc: void temp(T &a);
};
//temp.cpp( )
void ABc<T>::temp(T &a){} //defination ( it should be in header file?????????)
template class ABC<int>;
//main.cpp
int main()
{
int i=10;
ABC<int> a;
a.temp(i);
return 0;
}