home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 18708 < prev    next >
Encoding:
Internet Message Format  |  1993-01-05  |  804 b 

  1. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!bs
  2. From: bs@alice.att.com (Bjarne Stroustrup)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: forward declaration of a parameterized type?
  5. Message-ID: <24555@alice.att.com>
  6. Date: 5 Jan 93 13:42:25 GMT
  7. Article-I.D.: alice.24555
  8. References: <1993Jan5.034836.824@noose.ecn.purdue.edu>
  9. Organization: AT&T Bell Laboratories, Murray Hill NJ
  10. Lines: 17
  11.  
  12.  
  13.  
  14.  
  15.  > How do you do a forward declaration of a parameterized type?  This sort of
  16.  > thing doesn't seem to work:
  17.  
  18.  > class LinkedList<foo>;
  19.  
  20. template<class T> class LinkedList;    // <<< this way
  21.                     // tells the compiler that LinkedList
  22.                     // is a template of one type argument
  23.  
  24.  > class foo{
  25.  > public:
  26.  >     LinkedList<foo> *internal_foo_list;
  27.  >
  28.  > };
  29.