|
From: Ioannis V. <no...@ho...> - 2003-01-13 13:26:50
|
Yes. Alternatively you can use the keyword export for the definition but that is not supported yet by all compilers.=0D =0D =0D =0D =0D Ioannis Vranos=0D =0D * Programming pages: http://www.noicys.freeurl.com=0D * Alternative URL: http://run.to/noicys =0D =0D =0D -------Original Message-------=0D =0D From: Esteban Valverde=0D Date: 13 January 2003 15:13:12=0D To: dev-cpp=0D Subject: Re: [Dev-C++] templates in C++=0D =0D Hi, do you put all your template code in a header file and then include i= t=0D in yout main program ?=0D =0D //file.h=0D =0D template <class T>=0D class A{=0D A();=0D void B();=0D std::set<T> _list;=0D };=0D =0D template <class T>=0D A<T>::A(){=0D =2E..=0D }=0D =0D template <class T>=0D void A<T>::B(){=0D =2E..=0D }=0D =0D // end file.h=0D =0D // main.cc=0D #include "file.h"=0D =0D int main(void)=0D {=0D A<int> a1;=0D a1.B();=0D =0D return 0;=0D }=0D =0D best regards, Esteban=0D =0D =0D -------------------------------------------------------=0D This SF.NET email is sponsored by: FREE SSL Guide from Thawte=0D are you planning your Web Server Security? Click here to get a FREE=0D Thawte SSL guide and find the answers to all your SSL security issues.=0D http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en=0D _______________________________________________=0D Dev-cpp-users mailing list=0D Dev...@li...=0D TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm=0D https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20 |