home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!wupost!m.cs.uiuc.edu!sunb10.cs.uiuc.edu!sparc10.cs.uiuc.edu!pjl
- From: pjl@sparc10.cs.uiuc.edu (Paul Lucas)
- Subject: Re: pointer typecasting question...
- Message-ID: <1992Sep11.140416.6862@sunb10.cs.uiuc.edu>
- Sender: news@sunb10.cs.uiuc.edu
- Organization: University of Illinois at Urbana-Champaign
- References: <1992Sep10.210319.4450@news.columbia.edu>
- Distribution: usa
- Date: Fri, 11 Sep 1992 14:04:16 GMT
- Lines: 22
-
- In <1992Sep10.210319.4450@news.columbia.edu> kps@cunixb.cc.columbia.edu (Karthik P Sheka) writes:
-
- >I'm working on a C++ program that is using a C package that is giving
- >problems (The package was not meant to be used in C++):
-
- >One C call I make, CreateButton, takes as an arguement, a pointer to a
- >function that takes one arguement and returns void:
-
- >void function(int arguement);
- >main()
- >{
- > CreateButton(function);
- >}
-
- [ ... other stuff on using a member-function as a callback elided... ]
-
- *****> A pointer-to-member is _not_ an ordinary pointer; rather it's
- an offset. So "no" you can't do this. This is a very FAQ.
- --
- - Paul J. Lucas University of Illinois
- AT&T Bell Laboratories at Urbana-Champaign
- Naperville, IL pjl@cs.uiuc.edu
-