I think that you have got confused with the syntax of declaration and implementation. So here is an example with most of the common things you will likely need. [Please ask if I have missed something]
class Non_Template
{
// stuff here
public:
// Class DEFINITION
template<typename T>
class some_Template
{
public:
T obj;
void setObj(const T&);
};
// Two diferent uses of the template
some_Template<int> IObj;
some_Template<double> DObj;
};
// Declartion of a member function outside of the class
template<class T>
void Non_Template::some_Template<T>::setObj(const T& A)
{
obj=A;
return;
}
int
main()
{
Non_Template X;
X.DObj.setObj(4.5); // accessing the member via the class
}
Note I made the template declaration AND the objects public, that was not necessary so change as you wish.