Hello,
In my test.h file,
template <class T>
class B : public A<T> {
public:
// B( const T &x ) : A<T>(x) {}
B<T> * my_method( const T &x );
}
Given the test.h file, how do I declare my_method(const T &x) in test.cpp so that two files can compile together?
I tried following in test.cpp, but it was not working.
#include "test.h"
template <class T>
B<T>*::my_method(const T &x)
{
B<T>* temp_test;
return temp_test;
}
Thank you.