home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 15962 < prev    next >
Encoding:
Text File  |  1992-11-09  |  669 b   |  28 lines

  1. Path: sparky!uunet!pipex!warwick!uknet!gdt!aber!brw
  2. From: brw@aber.ac.uk (Benjamin Roy Whittle)
  3. Newsgroups: comp.lang.c++
  4. Subject: template question
  5. Message-ID: <1992Nov9.121452.22811@aber.ac.uk>
  6. Date: 9 Nov 92 12:14:52 GMT
  7. Sender: brw@aber.ac.uk (Benjamin Roy Whittle)
  8. Organization: University of Wales, Aberystwyth
  9. Lines: 17
  10.  
  11.  
  12.     If I write the following
  13.  
  14. template<class T>
  15. class stack { /* public interface stuff push pop etc*/};
  16.  
  17. but I want to say that the class T should have a function copy available
  18. for objects of that class, so that the function can be used in the
  19. implementation of the stack.
  20.  
  21. How do I do it please?
  22.  
  23. email appreciated.
  24.  
  25. ben
  26.  
  27. brw@aber.ac.uk
  28.