home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16246 < prev    next >
Encoding:
Internet Message Format  |  1992-11-14  |  1.4 KB

  1. Path: sparky!uunet!portal!lll-winken!fnnews.fnal.gov!mp.cs.niu.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!meibm10.cen.uiuc.edu!pl2440
  2. From: pl2440@meibm10.cen.uiuc.edu (Paul Jay Lucas)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Pointer to constructors||class?
  5. Message-ID: <Bxo9JE.AHq@news.cso.uiuc.edu>
  6. Date: 13 Nov 92 20:42:48 GMT
  7. References: <5591@krafla.rhi.hi.is>
  8. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  9. Organization: University of Illinois at Urbana
  10. Lines: 27
  11.  
  12. In <5591@krafla.rhi.hi.is> yngvi@rhi.hi.is (Yngvi Sigurjonsson) writes:
  13.  
  14. >How can I get a pointer to constructor?? I would like too be able to
  15. >have a pointer to either a class or class constructor. I had intended to
  16. >use constructor pointers in a drawing program in such a way that mouse
  17. >down would do:
  18.  
  19. >ObjPointer= new ConsPointer(x,y)
  20.  
  21. *****>    Pointers to constructors are forbidden; I don't know what a
  22.     pointer to a class is.
  23.  
  24. >and then i could use virtual functions described for Object to work with
  25. >derived objects.
  26.  
  27. >I imagine I could define wrapper functions, and pointers too those to
  28. >call to the constructors but I really dont want to.
  29.  
  30. *****>    See Stroustrup 2nd ed. for discussion on "virtual constructors."
  31. -- 
  32.     - Paul J. Lucas                University of Illinois    
  33.       AT&T Bell Laboratories        at Urbana-Champaign
  34.       Naperville, IL            pjl@cs.uiuc.edu
  35. -- 
  36.     - Paul J. Lucas                University of Illinois    
  37.       AT&T Bell Laboratories        at Urbana-Champaign
  38.       Naperville, IL            pjl@cs.uiuc.edu
  39.