home *** CD-ROM | disk | FTP | other *** search
- 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
- From: pl2440@meibm10.cen.uiuc.edu (Paul Jay Lucas)
- Newsgroups: comp.lang.c++
- Subject: Re: Pointer to constructors||class?
- Message-ID: <Bxo9JE.AHq@news.cso.uiuc.edu>
- Date: 13 Nov 92 20:42:48 GMT
- References: <5591@krafla.rhi.hi.is>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois at Urbana
- Lines: 27
-
- In <5591@krafla.rhi.hi.is> yngvi@rhi.hi.is (Yngvi Sigurjonsson) writes:
-
- >How can I get a pointer to constructor?? I would like too be able to
- >have a pointer to either a class or class constructor. I had intended to
- >use constructor pointers in a drawing program in such a way that mouse
- >down would do:
-
- >ObjPointer= new ConsPointer(x,y)
-
- *****> Pointers to constructors are forbidden; I don't know what a
- pointer to a class is.
-
- >and then i could use virtual functions described for Object to work with
- >derived objects.
-
- >I imagine I could define wrapper functions, and pointers too those to
- >call to the constructors but I really dont want to.
-
- *****> See Stroustrup 2nd ed. for discussion on "virtual constructors."
- --
- - Paul J. Lucas University of Illinois
- AT&T Bell Laboratories at Urbana-Champaign
- Naperville, IL pjl@cs.uiuc.edu
- --
- - Paul J. Lucas University of Illinois
- AT&T Bell Laboratories at Urbana-Champaign
- Naperville, IL pjl@cs.uiuc.edu
-