home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!umn.edu!csus.edu!borland.com!pete
- From: pete@borland.com (Pete Becker)
- Subject: Re: static members of templates
- Message-ID: <1992Dec15.173341.7000@borland.com>
- Originator: pete@genghis.borland.com
- Sender: news@borland.com (News Admin)
- Organization: Borland International
- References: <CBT.92Dec15101117@hobbes.inesc.pt>
- Distribution: comp
- Date: Tue, 15 Dec 1992 17:33:41 GMT
- Lines: 25
-
- In article <CBT.92Dec15101117@hobbes.inesc.pt> cbt@hobbes.inesc.pt (Conceicao Batista Tavares) writes:
- >
- >I want to have a static member of a template
- >
- >Example:
- >
- > class A {
- > int a;
- > };
- >
- > template<T> class exemple {
- > static int elem;
- > };
- >
- >For the definition of the static member I have to do this?
- >
- > int exemple<A>::elem;
- >
-
- template <class T> int example<T>::elem;
-
- -- Pete
-
-
-
-