home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!usc!cs.utexas.edu!tamsun.tamu.edu!bpb9204
- From: bpb9204@tamsun.tamu.edu (Brent)
- Subject: Re: Chapter 6 of Mac C Prog. Primer 2nd Ed.
- Message-ID: <1992Jul30.013107.13930@tamsun.tamu.edu>
- Followup-To: comp.sys.mac.programmer
- Keywords: REMINDER.c
- Sender: bpb9204@tamsun.tamu.edu
- Organization: Texas A&M Univ., Inc.
- References: <1992Jul29.200948.14146@ccu.umanitoba.ca>
- Date: Thu, 30 Jul 1992 01:31:07 GMT
- Lines: 25
-
- umdenbo0@ccu.umanitoba.ca (David A. Denboer) writes:
- |reminder->notify.nmResp = &LaunchResponse;
- |
- |It gives me a pointer types don't match error for "&LaunchResponse"
- |
- |LaunchResponse is the function that I am using to post a notification
- |
- |Anyway, if you have had trouble with this, and gotten it to work, let me know
- |how you did it!!!
-
- David, in C, a function name ONLY evaluates to the address of that
- function. I.e., LaunchResponse gives an address but LaunchResponse()
- calls the function. Taking the address of functions (&LaunchResponse)
- and of arrays (&char_array) doesn't really mean anything in C since
- these to names evaluate to an address/offset anyway.
-
- Your code should simply be: reminder->notify.nmResp = LaunchResponse;
-
- Hope this helps.
- -Brent
- --
- +-------------------------+ Pale Terror trembling guards the fountain's head,
- |Brent P. Burton, N5VMG | And rouses Fancy on her wakeful bed;
- |bpb9204@tamsun.tamu.edu | From realms of viewless spirits tears the veil,
- +-------------------------+ And there reveals the unutterable tale. - M. Lewis
-