//my.h struct AFX_EXT_CLASS B { }; struct AFX_EXT_CLASS C { }; class AFX_EXT_CLASS A { public: template<class T> BOOL fun(T &Func) { } }; //my.cpp template AFX_EXT_CLASS BOOL A::fun<B>(B &func); template AFX_EXT_CLASS BOOL A::fun<C>(C &func);