amanyasin
Technical User
- Feb 7, 2003
- 28
Hi
Dear i want to use class template in header file .h , i also want to keep my code separat in .cpp file. can you guide me how it is possible?
===============
.h file
template<typename t>
class myclass
{
void myfunction(t);
};
==============
.cpp file
template<typename t>
void myclass<t>::myfuntion(t)
{
..
..
}
===========
my main program
..
..
myclass<double> test;
test.myfunction( double);
...
==============
for classess or namspacess
thanks in advance
Dear i want to use class template in header file .h , i also want to keep my code separat in .cpp file. can you guide me how it is possible?
===============
.h file
template<typename t>
class myclass
{
void myfunction(t);
};
==============
.cpp file
template<typename t>
void myclass<t>::myfuntion(t)
{
..
..
}
===========
my main program
..
..
myclass<double> test;
test.myfunction( double);
...
==============
for classess or namspacess
thanks in advance